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

C++0x varadic templates and unordered map

kfsone
New Contributor I
547 Views
Project I work on has migrated a number of std::maps over to unordered_maps with GCC 4.4.3.
With icpc 11.1.0.69 this generates several errors:
/usr/include/c++/4.4.3/c++0x_warning.h(31): catastrophic error: #error directive: This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
/usr/include/c++/4.4.3/c++0x_warning.h(31): catastrophic error: #error directive: This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
I was specifying -std=c++0x, I tried changing it to -std=gnu++0x, but same error. So I tried manually defininng
If I define-D__GXX_EXPERIMENTAL_CXX0X__
but then I get errors/warnings about varadic template arguments ("typename...").
Do I have to wait for icpc 12.x or is there a way to get unordered_map working with this icpc?
0 Kudos
2 Replies
Feilong_H_Intel
Employee
547 Views
Hi kfsone,

There is a feature request regarding variadic template in our problem-tracking database already. I'll let you know when I have an update.

Thank you.
--
Feilong H.
Intel Developer Support

Tools Knowledge Base: http://software.intel.com/en-us/articles/tools
0 Kudos
Feilong_H_Intel
Employee
546 Views
Hi there,

This feature has been implemented in icc 12.1 (which is a part of Composer XE 2011 Update 6). You may download it at https://registrationcenter.intel.com.

Thanks,
Feilong
0 Kudos
Reply