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

icpc tr1 header problem

florianmichael
Beginner
801 Views
Hi,

There seems to be a problem using icpc 12.0.0 with the g++ 4.4.4 headers that prevents me
from compiling. It is perhaps related to
http://software.intel.com/en-us/articles/some-gcc-headers-will-not-compile-due-to-use-of-c0x-variadictemplates/
although that adresses icpc 11.
I traced it to the use of tr1 headers:

Minimal coding example:

#include

int main(int argc, char** argv){
}

While g++ 4.4.4 compiles this without complaint, icpc yields two pages of errors
using variadric templates of the form

/usr/include/c++/4.4.4/tr1_impl/type_traits(226): error: expected an identifier
template
^
/usr/include/c++/4.4.4/tr1_impl/type_traits(227): error: expected a ")"
struct is_function<_Res(_ArgTypes...)>

I have tried different compiler switches ( -std=c++0x, -U__GXX_EXPERIMENTAL_CXX0X__ ) to no avail.
Any workaround would be very much appreciated. I do need the tr1 header in my code, but I do not
need C++0x / variadric templates / etc.

Best Regards,
FM
0 Kudos
2 Replies
Shenghong_G_Intel
801 Views
Hi FM,

I have tried with the icc12.1 and it will not report such an error (I tried ICC12.0 and I can get the same issue with you, so I think it is fixed in 12.1.):

$icpc --version

icpc (ICC) 12.1.0 20110811

Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

$icpc test.c

$cat test.c

#include

int main(int argc, char** argv){

}

$

Any issue, please let me know.

Thanks,
Shenghong

0 Kudos
florianmichael
Beginner
801 Views
Hi Shenghong,

Many thanks for your quick answer! I will test this as soon as I can get an update to 12.1 organized!

Thank you,
FM
0 Kudos
Reply