Re: [Boost-bugs] [Boost C++ Libraries] #8813: compiler errors with gcc in c++11 mode

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8813: compiler errors with gcc in c++11 mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-13 07:30:09


#8813: compiler errors with gcc in c++11 mode
--------------------------------+-----------------------
  Reporter: oleg.alexandrov@… | Owner: pdimov
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: smart_ptr
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------+-----------------------

Comment (by pdimov):

 `unspecified_bool_type` is not a documented part of `shared_array` and is
 not present when explicit operators are supported. You should either use

 {{{
 #if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS )

     explicit operator bool () const
     {
         return m_data.size() > 0;
     }

 #else
     // your current definition
 #endif

 }}}

 or define your own `unspecified_bool_type`.

 Incidentally, your code above doesn't seem to compile, because
 `m_data.size() > 0` returns a `bool`, which is not convertible to
 `unspecified_bool_type`.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8813#comment:3>
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:13 UTC