mirror of
https://github.com/boostorg/log.git
synced 2026-01-26 18:42:17 +00:00
write() no longer asserts when the stream wrapper is not attached to a string. Rather, it behaves more like a standard stream write() when the stream is bad.
[SVN r84514]
This commit is contained in:
@@ -355,11 +355,14 @@ public:
|
||||
typename aux::enable_if_char_type< OtherCharT, basic_formatting_ostream& >::type
|
||||
write(const OtherCharT* p, std::streamsize size)
|
||||
{
|
||||
m_stream.flush();
|
||||
sentry guard(*this);
|
||||
if (guard)
|
||||
{
|
||||
m_stream.flush();
|
||||
|
||||
string_type* storage = m_streambuf.storage();
|
||||
BOOST_ASSERT(storage != NULL);
|
||||
aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_stream.getloc());
|
||||
string_type* storage = m_streambuf.storage();
|
||||
aux::code_convert(p, static_cast< std::size_t >(size), *storage, m_stream.getloc());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user