Open
Description
Bugzilla Link | 27807 |
Version | 3.8 |
OS | Windows NT |
Reporter | LLVM Bugzilla Contributor |
CC | @CaseyCarter,@DougGregor |
Extended Description
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.