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

Compile error in the latest boost with c++11 option

lee__kyubeom
Beginner
670 Views

[Makefile]

GCC = /usr/local/bin/g++
CC = /opt/intel/bin/icpc

INC = -I/usr/boost_1_68_0

COMPILE_OPTION      =  -std=c++1y

all:; $(CC) $(INC) $(COMPILE_OPTION) main.cpp

 

[main.cpp]

#include <iostream>
#include <boost/unordered_map.hpp>

using namespace std;

int main()
{
 cout<<"hello!"<<endl;
 return 0;
}
 

I'm using intel c++ compiler 16.0.1 which is in parallel studio 2016 update 1 package.

If the option -std=c++11 exists, the compile is failed with error as follows:

boost/unordered/unordered_map.hpp(2201): error: exception specification is incompatible with that of previous function "boost::unordered::unordered_multimap<K, T, H, P, A>::swap" (declared at line 1317)
        BOOST_NOEXCEPT_IF(value_allocator_traits::is_always_equal::value&&boost::is_nothrow_swappable<H>::value&&boost::is_nothrow_swappable<P>::value) 

 

If the option -std=c++11 is omitted, the compile succeeds. I think it might be a compile bug because g++(4.8.2) doesn't fail the compile.

The first of all, the license is expired. So, I cannot compile the test code with newer version of intel compiler. 

Can I know whether this circumstance is bug or not?

0 Kudos
1 Solution
2 Replies
Viet_H_Intel
Moderator
671 Views

You can get a free trial with newer compiler to verify the issue.

https://software.intel.com/en-us/parallel-studio-xe/choose-download/free-trial-cluster-linux-fortran ;

0 Kudos
lee__kyubeom
Beginner
670 Views

This problem has been solved since 2016 update 3. Thank you.

0 Kudos
Reply