Variadic templates + template alias = BOOM

Variadic templates + template alias = BOOM


The attached file, when compiled with "icl /Qstd=c++0x test.cpp", results in

Intel C++ Compiler XE for applications running on IA-32, Version Build 20120410
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
test.cpp(4): internal error: assertion failed at: "shared/cfe/edgcpfe/ms_lower_name.c", line 1653
class tuple;
compilation aborted for test.cpp (code 4)

The version without a template alias compiles fine.

Also, compiling a project (in VS2010) where this error was first encountered gives a message similar to this, but not quite---note the missing "internal":

1>main.cpp(104): error : assertion failed at: "shared/cfe/edgcpfe/ms_lower_name.c", line 1653

In both cases, the reported location has nothing to do with the actual problem source.

Best regards,

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This has recently been reported by a different customer as DPD200181857.

Here was their reduced example, which you can see has nothing to do with variadiac templates but does have to do with template aliases:

// causes assertion in ms_lower_name.c (compile with icl/Qstd=c++0x option)
class Foo {};

using FooTemplate = Foo;

template class>
class BarTemplate {};

typedef BarTemplate Bar;

The developer has justfixed this yesterdayso it should be fixed in the next 12.1 update.
Thanks for providing a test case. Sorry for the inconvenience.


Leave a Comment

Please sign in to add a comment. Not a member? Join today