From 197e356f77130360f351a7196cd5cfb938faf2a7 Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sat, 26 Aug 2023 20:23:55 +0000 Subject: [PATCH] fix cource_loc and consteval check macro --- include/spdlog/common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 0841329e..27974705 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -113,7 +113,7 @@ {} #endif -#if SPDLOG_CPLUSPLUS > 201703L +#if SPDLOG_CPLUSPLUS > 201811L # define SPDLOG_CONSTEVAL consteval #elif SPDLOG_CPLUSPLUS < 201402L # define SPDLOG_CONSTEVAL @@ -164,19 +164,19 @@ struct source_loc template struct format_string_wrapper { - SPDLOG_CONSTEVAL format_string_wrapper(const Char* fmtstr, source_loc loc = source_loc{details::source_location::current()}) + SPDLOG_CONSTEVAL format_string_wrapper(const Char* fmtstr, source_loc loc = source_loc::current()) : fmt_{fmtstr} , loc_{loc} {} #if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION >= 80000 - SPDLOG_CONSTEXPR format_string_wrapper(fmt_runtime_string fmtstr, source_loc loc = source_loc{details::source_location::current()}) + SPDLOG_CONSTEXPR format_string_wrapper(fmt_runtime_string fmtstr, source_loc loc = source_loc::current()) : fmt_{fmtstr} , loc_{loc} {} #elif defined(SPDLOG_USE_STD_FORMAT) && SPDLOG_CPLUSPLUS >= 202002L template requires std::is_convertible_v - SPDLOG_CONSTEXPR format_string_wrapper(S fmtstr, source_loc loc = source_loc{details::source_location::current()}) + SPDLOG_CONSTEXPR format_string_wrapper(S fmtstr, source_loc loc = source_loc::current()) : fmt_{fmtstr} , loc_{loc} {}