diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 0a262eb2..059627c8 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -75,6 +75,16 @@ # endif #endif +#ifdef SPDLOG_USE_STD_FORMAT + #define SPDLOG_CONSTEXPR_FUNC constexpr +#else // Being built with fmt + #if FMT_USE_CONSTEXPR + #define SPDLOG_CONSTEXPR_FUNC FMT_CONSTEXPR + #else + #define SPDLOG_CONSTEXPR_FUNC inline + #endif +#endif + #if defined(__GNUC__) || defined(__clang__) # define SPDLOG_DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER)