diff --git a/include/fmt/core.h b/include/fmt/core.h index 2bda4aca..9b9a59c9 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -973,10 +973,9 @@ class iterator_buffer : public Traits, public buffer { buffer(grow, data_, 0, buffer_size), out_(other.out_) {} ~iterator_buffer() { + // Don't crash if flush fails during unwinding. FMT_TRY { flush(); } - FMT_CATCH(...) { - // Don't crash if flush fails during unwinding. - } + FMT_CATCH(...) {} } auto out() -> OutputIt {