Open llvmbot opened 9 years ago
mentioned in issue llvm/llvm-bugzilla-archive#45801
mentioned in issue llvm/llvm-bugzilla-archive#23107
Bug llvm/llvm-bugzilla-archive#45801 has been marked as a duplicate of this bug.
Bug llvm/llvm-bugzilla-archive#23107 has been marked as a duplicate of this bug.
Bug llvm/llvm-project#22281 has been marked as a duplicate of this bug.
Extended Description
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 A {};
template
class B {
public:
B(){};
};
template
class C : public B<A> {
public:
using Base = B<A>;
using Base::B; // <-- Error here
};
static const C c{};
When writing one of the following, equivalent statements instead of "using Base::B" the code compiles:
using Base::Base using B<A>::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