Make UDL tests not try to use UDLs when they are disabled

This commit is contained in:
Dana Jansens 2023-08-24 23:21:51 -04:00 committed by GitHub
parent db49ecb4f7
commit a079b9cff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,13 +228,15 @@ if (CMAKE_CXX_STANDARD GREATER_EQUAL 20)
# Compile-time argument name check
expect_compile(format-string-name "
#if defined(FMT_HAS_CONSTEVAL) && FMT_USE_NONTYPE_TEMPLATE_ARGS
#if defined(FMT_HAS_CONSTEVAL) && \
FMT_USE_USER_DEFINED_LITERALS && FMT_USE_NONTYPE_TEMPLATE_ARGS
using namespace fmt::literals;
fmt::print(\"{foo}\", \"foo\"_a=42);
#endif
")
expect_compile(format-string-name-error "
#if defined(FMT_HAS_CONSTEVAL) && FMT_USE_NONTYPE_TEMPLATE_ARGS
#if defined(FMT_HAS_CONSTEVAL) && \
FMT_USE_USER_DEFINED_LITERALS && FMT_USE_NONTYPE_TEMPLATE_ARGS
using namespace fmt::literals;
fmt::print(\"{foo}\", \"bar\"_a=42);
#else