Improve support for C++98 compilers that require a copy ctor when binding a reference to a temporary.
This commit is contained in:
+2
-1
@@ -98,7 +98,8 @@ with an arbitrary action performed when formatting is complete:
|
||||
|
||||
// Formats an error message and prints it to std::cerr.
|
||||
fmt::Formatter<PrintError> ReportError(const char *format) {
|
||||
return Move(fmt::Formatter<PrintError>(format));
|
||||
fmt::Formatter<PrintError> f(format);
|
||||
return f;
|
||||
}
|
||||
|
||||
ReportError("File not found: {}") << path;
|
||||
|
||||
Reference in New Issue
Block a user