From a079b9cff667251a17e19fe426c9a70911ac7e71 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 24 Aug 2023 23:21:51 -0400 Subject: [PATCH] Make UDL tests not try to use UDLs when they are disabled --- test/compile-error-test/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/compile-error-test/CMakeLists.txt b/test/compile-error-test/CMakeLists.txt index 1b92e93a360c..5f466c8be3eb 100644 --- a/test/compile-error-test/CMakeLists.txt +++ b/test/compile-error-test/CMakeLists.txt @@ -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