Variadic templates + template alias = BOOM

Variadic templates + template alias = BOOM

Hello.

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 12.1.4.325 Build 20120410
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
test.cpp
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,
Vladimir

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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 {};

template
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.

Judy

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen