From 6eb9cbe8adfd1b9be48abd4ba5f7978a4e5f7bdb Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sun, 9 Jun 2024 01:56:20 +0800 Subject: [PATCH] Also allow compiled format for clang >= 12 --- include/fmt/base.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/fmt/base.h b/include/fmt/base.h index 6b1d8140c29b9..b998eb093d895 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -145,6 +145,9 @@ import std; #elif defined(__cpp_nontype_template_args) && \ __cpp_nontype_template_args >= 201911L # define FMT_USE_NONTYPE_TEMPLATE_ARGS 1 +#elif defined(__clang_major__) && __clang_major__ >= 12 +// clang 12 already has enough support for {fmt} to use. +# define FMT_USE_NONTYPE_TEMPLATE_ARGS 1 #else # define FMT_USE_NONTYPE_TEMPLATE_ARGS 0 #endif