From c300f53b356a3bc73299c2add88807460e44c3ea Mon Sep 17 00:00:00 2001 From: Charles Milette Date: Fri, 4 Feb 2022 14:17:44 -0500 Subject: [PATCH] Add missing #if --- include/spdlog/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 305a9ed4..5bab7216 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -24,7 +24,6 @@ #if __cpp_lib_source_location >= 201907L #include -#define SPDLOG_HAS_STD_SOURCE_LOC #endif #ifdef SPDLOG_USE_STD_FORMAT @@ -307,11 +306,13 @@ struct source_loc , funcname{funcname_in} {} +#if __cpp_lib_source_location >= 201907L SPDLOG_CONSTEXPR source_loc(std::source_location loc) SPDLOG_NOEXCEPT : filename{loc.file_name()} , line{static_cast(loc.line())} , funcname{loc.function_name()} {} +#endif SPDLOG_CONSTEXPR bool empty() const SPDLOG_NOEXCEPT {