Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Variadic templates + template alias = BOOM

vpozdyayev
Beginner
334 Views
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
0 Kudos
1 Reply
Judith_W_Intel
Employee
334 Views

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
0 Kudos
Reply