-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
The following piece of code doesn't compile with Clang (21.1.0) while compiling well with GCC (15.2) (see here):
struct S {
template <class...>
void f() const& {}
template <class...>
void f() & {}
template <class...>
void f() && {}
};
template <class R, class Class>
void g(R(Class::*property)() const&) {}
template <class R, class Class>
void g(R(Class::*property)() const) {}
int main() {
g(&S::f);
}I think Clang either skips entirely or does poor job at the "template argument deduction" stage of function selection
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue