https://bugs.llvm.org/show_bug.cgi?id=45801
Bug ID: 45801
Summary: The using declaration doesn't work for parent class'
constructors.
Product: clang
Version: 10.0
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangb...@nondot.org
Reporter: 312988...@qq.com
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk
The following code works in GCC 9.3 and MSVC v19.24, but fails in Clang 10.0.0
(adding the typename keyword resolves that issue, but Clang has other problems
that GCC does not).
==================
template<typename>
struct A
{
int n;
A(bool)
{}
};
template<typename>
struct B
{
struct C : A<B>
{
using Base = A<B>;
using A<B>::A; // ok
using Base::n; // ok
// error: dependent using declaration resolved to type without
'typename'
using Base::A;
};
C get() const
{
return C(true);
}
};
int main()
{
auto b = B<int>();
b.get();
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs