Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7681 Discussions

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

asd__asdqwe
Beginner
160 Views

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
160 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
160 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
160 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