mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 13:18:43 +02:00
refactor: Introduce struct to hold a runtime format string
This brings the format types closer to the standard library types: * FormatStringCheck corresponds to std::basic_format_string, with compile-time checks done via ConstevalFormatString * RuntimeFormat corresponds to std::runtime_format, with no compile-time checks done. Also, it documents where no compile-time checks are done.
This commit is contained in:
@@ -103,7 +103,7 @@ bilingual_str format(util::BilingualFmt<sizeof...(Args)> fmt, const Args&... arg
|
||||
}
|
||||
}};
|
||||
return bilingual_str{tfm::format(fmt.original, original_arg(args)...),
|
||||
tfm::format(std::string{fmt.lit}, translated_arg(args)...)};
|
||||
tfm::format(RuntimeFormat{std::string{fmt.lit}}, translated_arg(args)...)};
|
||||
}
|
||||
} // namespace tinyformat
|
||||
|
||||
|
||||
Reference in New Issue
Block a user