From 9d1eba2f62d362e970e79a899ba8fe5d7e0f0c3f Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Thu, 25 May 2023 19:00:22 +0000 Subject: [PATCH] fix consteval macro --- include/spdlog/common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 046895a1..7988be70 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -112,8 +112,10 @@ catch (const std::exception &) {} #endif -#if SPDLOG_CPLUSPLUS > 201703L +#if SPDLOG_CPLUSPLUS >= 202002L +#if __cpp_consteval >= 202211L # define SPDLOG_CONSTEVAL consteval +# endif #elif SPDLOG_CPLUSPLUS < 201402L # define SPDLOG_CONSTEVAL #else @@ -163,7 +165,7 @@ struct format_string_wrapper : fmt_{fmtstr} , loc_{loc} {} -#else +#elif defined(SPDLOG_USE_STD_FORMAT) && SPDLOG_CPLUSPLUS >= 202002L && __cpp_concepts >= 202002L template requires std::is_convertible_v SPDLOG_CONSTEXPR format_string_wrapper(S fmtstr, details::source_location loc = details::source_location::current())