[Boost-bugs] [Boost C++ Libraries] #4759: shared_ptr to bool cast with Intel C++ Compiler 11.1

Subject: [Boost-bugs] [Boost C++ Libraries] #4759: shared_ptr to bool cast with Intel C++ Compiler 11.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-19 14:16:49


#4759: shared_ptr to bool cast with Intel C++ Compiler 11.1
----------------------------------------+-----------------------------------
 Reporter: abrarov@… | Owner: pdimov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: smart_ptr
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: shared_ptr Intel bool cast |
----------------------------------------+-----------------------------------
 shared_ptr-to-bool cast sometimes doesn't work on Intel C++ Compiler 11.1.

 Suggested patch:

 {{{
 --- boost/smart_ptr/detail/operator_bool.hpp Пн мар 2 10:45:22 2009
 +++ boost/smart_ptr/detail/operator_bool.hpp Чт сен 2 23:30:11 2010
 @@ -6,7 +6,7 @@
  // See accompanying file LICENSE_1_0.txt or copy at
  // http://www.boost.org/LICENSE_1_0.txt

 -#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) ||
 defined(__CINT__)
 +#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) ||
 defined(__CINT__) || defined (BOOST_INTEL)

      operator bool () const
      {

 }}}


 As test [http://sourceforge.net/projects/asio-samples/ asio-samples
 project] may be used. Watch at svn repository for the echo_server project:
 /src/ma/echo/server/session_manager.cpp:151. The "while" cycle doesn't
 work right (cycle works when shared ptr "active_session" points to
 nothing) without the suggested patch.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4759>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC