diff --git a/format.h b/format.h index 580a7966..1a3b83f1 100644 --- a/format.h +++ b/format.h @@ -1990,7 +1990,8 @@ void format(BasicFormatter &f, const Char *&format_str, const T &value) { os << value; internal::Arg arg; internal::Value &arg_value = arg; - arg_value = internal::MakeValue(os.str()); + std::basic_string str = os.str(); + arg_value = internal::MakeValue(str); arg.type = internal::Arg::STRING; format_str = f.format(format_str, arg); }