https://llvm.org/bugs/show_bug.cgi?id=25483
Bug ID: 25483 Summary: Injected base class name not available when CRTP base class is instantiated using a subclass that is itself a template instantiation. Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: paul.ryan.har...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified An injected base class name is not available to be used as a constructor when a CRTP base class is instantiated using a subclass that is itself a template instantiation. The following works as expected: template <typename> struct A {}; struct B : public A<B> { B() : A() {} }; int main() { B b; } The following results in: error: member initializer 'A' does not name a non-static data member or base class template <typename> struct A {}; template <typename T> struct B : public A<B<T>> { B() : A() {} }; int main() { B<void> b; } The following workaround is available: template <typename T> struct B : public A<B<T>> { using A = A<B>; B() : A() {} }; -- 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