Hello.
The following simple code compiles and runs fine.
template<class D> struct CRTP { const D& Derived() const { return static_cast<const D&>(*this); } auto get() const { return Derived().get(); } }; struct C : CRTP<C> { int get() const { return 123; } }; template<class T> void func(const CRTP<T>& x) { std::cout << x.get() << '\n'; } int main() { C c; func(c); }
But if I comment the call func(c) at the line 23, compilation fails with the following error:
assertion failed: dump_type_declaration: bad type kind (shared/cfe/edgglue/edg_type.c, line 433)
The compiler is:Intel(R) C++ Compiler XE for applications running on IA-32, Version 15.0.7.287 Build 20160518
Thread Topic:
Bug Report