Opened 3 years ago

Closed 3 years ago

#11545 closed Bugs (fixed)

Sentry problem

Reported by: lcarreon@… Owned by: Andrey Semashev
Milestone: To Be Determined Component: log
Version: Boost 1.59.0 Severity: Problem
Keywords: sentry Cc:


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&))

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by Andrey Semashev

Please, see #11064. Could you try one of the workarounds proposed there?

comment:2 Changed 3 years ago by Andrey Semashev

Resolution: fixed
Status: newclosed

Hopefully, fixed in Not tested as I don't have the compiler.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Andrey Semashev.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.