https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116011

--- Comment #4 from Hubert Tong <hstong at ca dot ibm.com> ---
(In reply to Andrew Pinski from comment #3)
> The reality of the issue comes down to accepting this:
> ```
> struct foo { int val; };
> 
> int main() { decltype(&(foo::val)) ptr; }
> ```

Yes, which was added in C++11. GCC (unlike Clang and EDG) accepts even in
SFINAE contexts under pre-C++11 modes though:
```
template <typename T> void f(char (*)[sizeof(T::x)] = 0);
template <typename T> void f(char * = 0);
struct A { int x; };
void g() { f<A>(); } // OK in C++03 with Clang and EDG
```

Reply via email to