https://llvm.org/bugs/show_bug.cgi?id=26938
Bug ID: 26938 Summary: failure to resolve nested class template after befriending it Product: clang Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: l...@fortitu.de CC: llvm-bugs@lists.llvm.org Classification: Unclassified clang 3.8 and trunk (r263425) fail to compile the following code snippet. Recent clang versions up to 3.7 and all major gcc versions from 4.0 till 5.2 compile the code without warnings. (The testcase was reduced mostly with creduce from the polymake source) Removing the friend statement in 'struct A' fixes the error, alternatively removing the forward declaration of 'Y' fixes it as well. // code template <typename> struct X { template <typename> struct Y; struct A { template <typename> friend struct Y; }; template <typename> struct Y { }; }; template <typename> struct B : X<int>::template Y<int> { } ; $ clang++ -c bug.cc bug.cc:9:29: error: 'Y' following the 'template' keyword does not refer to a template struct B : X<int>::template Y<int> { } ; ~~~~~~~~ ^ bug.cc:9:30: error: expected class name struct B : X<int>::template Y<int> { } ; ^ 2 errors generated. $ clang++ -v clang version 3.9.0 (http://llvm.org/git/clang.git 00560a217508ec5553150bb43269359ded932a88) (http://llvm.org/git/llvm.git a4bfc57321dbb6d712297822e6be9855c1bf8791) -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs