Open llvmbot opened 8 years ago
Clang fails to compile this example (http://stackoverflow.com/q/37310866/2069064):
struct S { using T = int; operator T() { return 42; } }; int main() { S{}.operator T(); }
with:
prog.cc:7:18: error: unknown type name 'T'; did you mean 'S::T'? S{}.operator T(); ^ S::T prog.cc:2:11: note: 'S::T' declared here using T = int; ^
But according to [basic.lookup.classref]/7 (updated from CWG 1111), the scope of S should be considered. gcc compiles the example.
S
This bug may be breaking the build of ACE/TAO 6.3.3, which introduced usage similar to this bug between 6.3.3 and 6.3.1, and now no longer compiles under clang (but still compiles under gcc).
Extended Description
Clang fails to compile this example (http://stackoverflow.com/q/37310866/2069064):
with:
But according to [basic.lookup.classref]/7 (updated from CWG 1111), the scope of
S
should be considered. gcc compiles the example.