Boost C++ Libraries: Ticket #11545: Sentry problem https://svn.boost.org/trac10/ticket/11545 <p> I compiled Boost 1.59.0 with Solaris Studio 12.4 in C++11 mode and I get the following error messages: </p> <p> "./boost/log/utility/formatting_ostream.hpp", line 627: Error: Cannot use boost::log::v2_mt_posix::basic_formatting_ostream&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt;&gt;::sentry to initialize bool. </p> <p> 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: </p> <blockquote> <p> operator bool() { return base_type::operator bool(); } </p> </blockquote> <p> after the lines: </p> <blockquote> <p> BOOST_DELETED_FUNCTION(sentry(sentry const&amp;)) </p> </blockquote> <blockquote> <p> BOOST_DELETED_FUNCTION(sentry&amp; operator= (sentry const&amp;)) </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11545 Trac 1.4.3 Andrey Semashev Tue, 18 Aug 2015 07:13:07 GMT <link>https://svn.boost.org/trac10/ticket/11545#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11545#comment:1</guid> <description> <p> Please, see <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/11064" title="#11064: Support Requests: boost support c++11 with Solaris Studio 12.4 (closed: wontfix)">#11064</a>. Could you try one of the workarounds proposed there? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Sun, 23 Aug 2015 14:46:36 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11545#comment:2 https://svn.boost.org/trac10/ticket/11545#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Hopefully, fixed in <a class="ext-link" href="https://github.com/boostorg/log/commit/c2789a4eff282867f7ea79dbfde08d0b90389aae"><span class="icon">​</span>https://github.com/boostorg/log/commit/c2789a4eff282867f7ea79dbfde08d0b90389aae</a>. Not tested as I don't have the compiler. </p> Ticket