mirror of
https://github.com/boostorg/system.git
synced 2025-08-01 21:34:29 +02:00
Fix error_code's operator<< for arbitrary basic_ostream specializations
This fixes a regression from commit
a9b64a888a
.
Calling `operator<<` with `std::string` only works for `std::ostream`.
Use `c_str()` to restore the previous behavior of using `const char*`,
which works for any `basic_ostream` specialization.
This commit is contained in:
@@ -604,7 +604,7 @@ public:
|
||||
inline friend std::basic_ostream<Ch, Tr>&
|
||||
operator<< (std::basic_ostream<Ch, Tr>& os, error_code const & ec)
|
||||
{
|
||||
return os << ec.to_string();
|
||||
return os << ec.to_string().c_str();
|
||||
}
|
||||
|
||||
std::string what() const
|
||||
|
Reference in New Issue
Block a user