Community
cancel
Showing results for 
Search instead for 
Did you mean: 
thomasmang
Beginner
69 Views

boost::lexical_cast unknown exception raised

Note:
Also posted on boost-user mailing list some days ago.

Intel engineers might want to have a look at this: The sample program (below) using boost::lexical_cast (boost verstion 1.46.1) raises an unknown exception (second catch handler is entered) when optimizations are enabled. The problematic option is /O - in all cases except of /Od [all optimizations disabled] the exception is raised.
To the best of my knowledge the code snippet should work fine, and it does work fine using other windows compilers (MSVC, MinGW), but behaves exceptional (literally) when compiled with Intel 12.0.2.154 embedded into MSVC 2005. I don't know if this is an Intel or boost issue - or eventually even some error my side ??
Full command line options and snippet below.

thanks,
Thomas

command line options:

/c /O2 /Og /Qipo /I "C:\\Libraries\\Boost\\boost_1_46_1" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /EHsc /MD /GS- /fp:strict /Za /Fo"ReleaseFinal/" /W3 /nologo /Wp64 /Zi /Qfp-speculation:strict /Quse-intel-optimized-headers /Qintel-extensions-


mini-program:

#include
#include
#include

#include "boost/lexical_cast.hpp"


int main()
{
try
{
std::string X = boost::lexical_cast<:STRING>(2 - 1);
std::cout << X << std::endl;
}
catch (boost::bad_lexical_cast const &)
{
std::cout << "boost::lexical_cast exception occurred.";
}
catch (...)
{
std::cout << "An unknown exception occurred.";
}
}
0 Kudos
2 Replies
thomasmang
Beginner
69 Views

My evaluation licence has expired.

Could anyone please report me how the above code snippet behaves with the new update 3 release of the Intel 2011 Composer ?

Have Intel engineers been able to track down the problem further (boost coding problem or issue in Intel code generation ?)

thanks !
JenniferJ
Moderator
69 Views

this issue does not happen with 12.1. this is the same issue as posted here.

Please download the Intel C++ Composer XE for Windows12.0 update 6 or update 7 that contains the fix.

btw. You can get two eval with one email account.

thanks,
Jennifer