Add a test for null byte in format string

This commit is contained in:
user202729 2026-04-23 09:04:15 +07:00
parent 2e58c3a82f
commit 6aa501d56d

View File

@ -239,6 +239,16 @@ if (CMAKE_CXX_STANDARD GREATER_EQUAL 20)
#endif
"
ERROR)
expect_compile(
format-string-embedded-nul-error
"
#if FMT_USE_CONSTEVAL
fmt::format(\"a\\0{}\");
#else
#error
#endif
"
ERROR)
# Compile-time argument name check
expect_compile(