https://bugs.llvm.org/show_bug.cgi?id=37768
Bug ID: 37768
Summary: expected the class name after '~' to name a destructor
Product: clang
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangb...@nondot.org
Reporter: spiri.luc...@gmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
I want to inherit the ctors of the base class and have a user-defined dtor in
my template specialization Class<Enum::b>. This won't work because I used a
type alias to name the base class, then I used the real class name to name the
inherited ctor. After this the name of the dtor doesn't get recognized anymore.
--
enum class Enum{
a, b, c
};
template<Enum, typename...>
struct Class {};
template<typename... Args>
using base_t = Class<Enum::a, Args...>;
template<typename... Args>
struct Class<Enum::b, Args...> : base_t<Args...>{
using base_t<Args...>::Class;
~Class() {} // expected class name after '~' to name a destructor
};
int main() {}
--
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