boost::program_options, boost::shared_ptr with Intel C++ Compiler 11.x

boost::program_options, boost::shared_ptr with Intel C++ Compiler 11.x

Hi, Intel C++ Compiler developers and users!

I'm using boost 1.40.

I have a project at http://sourceforge.net/projects/asio-samples/ (only SVN trunk is available now) It uses MS C++ Compiler (9.0 SP1 - MS Visual Studio 2008 SP1) and boost::program_options (+ boost::asio + boost::...).

When I switched that project (I mean "echo_server") to Intel C++ Compiler 11.1.038 (I tried all 11.1.x) and built debug version (Debug Win32) (with addition of option /vmg to compiler command line - why MS C++ Compiler don't need it?) it works fine except shared_ptr-to-bool cast (for example: include/ma/echo/server/session_manager.hpp: 319).

This issue I found only at "Debug Win32" build mode - at "Debug x64" all is fine and the built executable (echo_server.exe) works right.

When I build "Release Win32" or "Release x64", the built executable don't work at all - it fails somewhere at the boost::program_options (I think at std::vector::operator= or std::vector copy-constructor).

Does anybody:

1) tried to use boost::shared_ptr

2) tried to use boost::prorgam_options

with Intel C++ Compiler 11.1.x?

P.S. - If I change boost_1_40_0/boost/smart_ptr/detail/operator_bool.hpp: 9 - add

|| defined (BOOST_INTEL)

- then shared_ptr-to-bool cast works fine (Win32/x64 Debug/Release)

Regards, Marat Abrarov.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - mabrarov

Hi, Intel C++ Compiler developers and users!

I'm using boost 1.40.

I have a project at http://sourceforge.net/projects/asio-samples/ (only SVN trunk is available now) It uses MS C++ Compiler (9.0 SP1 - MS Visual Studio 2008 SP1) and boost::program_options (+ boost::asio + boost::...).

When I switched that project (I mean "echo_server") to Intel C++ Compiler 11.1.038 (I tried all 11.1.x) and built debug version (Debug Win32) (with addition of option /vmg to compiler command line - why MS C++ Compiler don't need it?) it works fine except shared_ptr-to-bool cast (for example: include/ma/echo/server/session_manager.hpp: 319).

This issue I found only at "Debug Win32" build mode - at "Debug x64" all is fine and the built executable (echo_server.exe) works right.

When I build "Release Win32" or "Release x64", the built executable don't work at all - it fails somewhere at the boost::program_options (I think at std::vector::operator= or std::vector copy-constructor).

Does anybody:

1) tried to use boost::shared_ptr

2) tried to use boost::prorgam_options

with Intel C++ Compiler 11.1.x?

P.S. - If I change boost_1_40_0boostsmart_ptrdetailoperator_bool.hpp: 9 - add "|| defined (BOOST_INTEL)" - then shared_ptr-to-bool cast works fine (Win32/x64 Debug/Release)

Regards, Marat Abrarov.

Are you building the boost libs with the Intel Compiler as well? You run the risk of incompatibility issues if you don't, although it shouldn't result in compile-time errors. You would see link-time or run-time errors most likely. I'll see if I can reproduce the error with the code you pointed to.

Leave a Comment

Please sign in to add a comment. Not a member? Join today