Make FMT_STRING redundant when FMT_USE_CONSTEVAL is enabled (#4612)

This commit is contained in:
friedkeenan
2025-11-22 16:36:29 -06:00
committed by GitHub
parent f20b16617e
commit 9f197b22ae

View File

@@ -4257,7 +4257,11 @@ class format_int {
* // A compile-time error because 'd' is an invalid specifier for strings. * // A compile-time error because 'd' is an invalid specifier for strings.
* std::string s = fmt::format(FMT_STRING("{:d}"), "foo"); * std::string s = fmt::format(FMT_STRING("{:d}"), "foo");
*/ */
#if FMT_USE_CONSTEVAL
# define FMT_STRING(s) s
#else
# define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::detail::compile_string) # define FMT_STRING(s) FMT_STRING_IMPL(s, fmt::detail::compile_string)
#endif // FMT_USE_CONSTEVAL
FMT_API auto vsystem_error(int error_code, string_view fmt, format_args args) FMT_API auto vsystem_error(int error_code, string_view fmt, format_args args)
-> std::system_error; -> std::system_error;