[LLVMbugs] [Bug 22242] New: Constructor inheritance with parent class alias fails for nested templates
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 15 07:08:47 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22242
Bug ID: 22242
Summary: Constructor inheritance with parent class alias fails
for nested templates
Product: clang
Version: 3.5
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: andreas.stoeckel at googlemail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Compiling the following code with clang++ -c test.cpp -std=c++11 fails with the
missleading error message
test.cpp:14:14: error: dependent using declaration resolved to type without
'typename' using Base::B;
template <class T>
class A {};
template <class T>
class B {
public:
B(){};
};
template <class T>
class C : public B<A<T>> {
public:
using Base = B<A<T>>;
using Base::B; // <-- Error here
};
static const C<int> c{};
When writing one of the following, equivalent statements instead of "using
Base::B" the code compiles:
using Base::Base
using B<A<T>>::Base
The error does also not occur if A is not a templated class. The code compiles
fine with gcc 4.9. I've posted a question at stackoverflow regarding this
problem at http://stackoverflow.com/q/27954940/2188211
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150115/741c0b6e/attachment.html>
More information about the llvm-bugs
mailing list