mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-02 06:20:09 +00:00
Enable stream exceptions (#581)
This commit is contained in:
parent
35f8f03670
commit
64599973e9
@ -90,6 +90,7 @@ template <typename Char, typename T>
|
|||||||
void format_value(basic_buffer<Char> &buffer, const T &value) {
|
void format_value(basic_buffer<Char> &buffer, const T &value) {
|
||||||
internal::FormatBuf<Char> format_buf(buffer);
|
internal::FormatBuf<Char> format_buf(buffer);
|
||||||
std::basic_ostream<Char> output(&format_buf);
|
std::basic_ostream<Char> output(&format_buf);
|
||||||
|
output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
|
||||||
output << value;
|
output << value;
|
||||||
buffer.resize(buffer.size());
|
buffer.resize(buffer.size());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user