Boost logo

Boost :

Subject: [boost] Workaround request: boost::shared_ptr & Intel C++ Compiler
From: Marat Abrarov (abrarov_at_[hidden])
Date: 2009-10-13 03:27:41


I wrote about my problem before (Boost-users Digest, Vol 2116, Issue 1: "boost::options, boost::shared_ptr with Intel
C++ Compiler 11.x") but didn't received any response yet.

So here's a copy:
I use boost 1.40.
I have a project at (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 - stupid Intel :) 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<std::string>::operator= or std::vector<std::string> 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?

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)

Does anybody has similar problems with Intel C++ Compiler and boost::shared_ptr? Is anybody from boost community
interested for Intel C++ Compiler support?

Marat Abrarov.

Boost list run by bdawes at, gregod at, cpdaniel at, john at