Skip to content

clang fails to find operator -> #104268

@ahatanak

Description

@ahatanak
struct D {
  template <typename T> void m() {}
};

template <typename T> struct S {
  void init() { (*this)->template m<T>(); };

  D *operator->();
};

clang rejects the code with the following error message:

<source>:6:35: error: no member named 'm' in 'S<T>'
    6 |   void init() { (*this)->template m<T>(); };

It looks like clang's behavior changed after 1595988ee6f9732e7ea79928af8a470ad5ef7dbe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"regression:19Regression in 19 release

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions