- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Eugene
Thank you for reporting the issue.
What's your platform? Is it for Linux or Windows or OSX?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for the reply.
Yuan C. (Intel) wrote:
What's your platform? Is it for Linux or Windows or OSX?
It's Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wasn't able to reproduce the problem, but I am using a development version of the compiler. Would you kindly post the preprocessed file along with the icl command line that you are using (to generate preprocessed file, add -E command line option on the icl command line and redirect standard output to a text file, then attach to the forum post)? Incidentally, you are using an older version of the compiler. A newer version of the compiler (16.0) is available. Be sure to #include iostream since the program calls cout.
Thanks! --Melanie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Melanie,
I've updated my compiler and can confirm that with the 16.0 version the problem is gone (and if I switch back to 15.0 it is there). If you still need the preprocessed file, please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know we aren't shipping updates to 15.0; I hope you are able to use the 16.0 compiler. Thanks for the info.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page