Community
cancel
Showing results for 
Search instead for 
Did you mean: 
asd__asdqwe
Beginner
78 Views

Yet another C++11 error (RTTI deactivated ?)

Hello,

The minimalist code found here http://en.cppreference.com/w/cpp/utility/functional/function/target cannot be compiled with icpc version 16.0.1 (gcc version 5.0.0 compatibility)

$  icpc -std=c++11 function.cpp                                                                                                 
function.cpp(9): error: class "std::function<int (int, int)>" has no member "target"
      if (arg.target<std::plus<int>>())

Of course, this compiles fine with clang++ and g++, thoughts ?

Thanks.

 

 

0 Kudos
3 Replies
Judith_W_Intel
Employee
78 Views

 

Thanks for the test case and reporting the problem. Indeed it does look like the compiler should be defining the __cpp_rtti feature macro in GNU 5.0 and later compatibility modes. I have entered this our bug tracking database as DPD200381053.

The obvious workaround is to add -D__cpp_rtti to the command line yourself.

Judy

Kittur_G_Intel
Employee
78 Views

Thanks Judy, I've added the CQ to this thread and will update as soon as the release with the fix is out, appreciate much.

_Kittur

Kittur_G_Intel
Employee
78 Views

Hi,
Just letting you know that this issue is fixed in the 16.0.3 (update 3) release that was out this week which you can download from the Intel Registration Center and  test it out, thanks.

Regards,
Kittur

Reply