[Boost-bugs] [Boost C++ Libraries] #11545: Sentry problem

Subject: [Boost-bugs] [Boost C++ Libraries] #11545: Sentry problem
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-18 07:06:55


#11545: Sentry problem
------------------------------+---------------------
 Reporter: lcarreon@… | Owner: andysem
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: sentry |
------------------------------+---------------------
 I compiled Boost 1.59.0 with Solaris Studio 12.4 in C++11 mode and I
 get the following error messages:

 "./boost/log/utility/formatting_ostream.hpp", line 627: Error: Cannot use
 boost::log::v2_mt_posix::basic_formatting_ostream<wchar_t,
 std::char_traits<wchar_t>, std::allocator<wchar_t>>::sentry to initialize
 bool.

 It seems that the problem here is that the conversion operator of the
 sentry base class is not exposed by the derived class. The fix I
 found suggested defining the required conversion operator on the
 derived class. Add the following line in
 boost/log/utility/formatting_ostream.hpp:

   operator bool() { return base_type::operator bool(); }

 after the lines:

   BOOST_DELETED_FUNCTION(sentry(sentry const&))

   BOOST_DELETED_FUNCTION(sentry& operator= (sentry const&))

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11545>
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:18 UTC