mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 11:28:20 +00:00
Mind the lifetime
This commit is contained in:
parent
a9da3d3852
commit
5ca3d00e26
3
format.h
3
format.h
@ -1990,7 +1990,8 @@ void format(BasicFormatter<Char> &f, const Char *&format_str, const T &value) {
|
||||
os << value;
|
||||
internal::Arg arg;
|
||||
internal::Value &arg_value = arg;
|
||||
arg_value = internal::MakeValue<Char>(os.str());
|
||||
std::basic_string<Char> str = os.str();
|
||||
arg_value = internal::MakeValue<Char>(str);
|
||||
arg.type = internal::Arg::STRING;
|
||||
format_str = f.format(format_str, arg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user