From ede8d848849ef314c65c1c993e287d5ba1cf75f1 Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Mon, 11 Jan 2021 11:25:27 +0100 Subject: [PATCH] fix constexpr declaration for c++11 --- include/spdlog/common-inl.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index 41d9b163..9c967248 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -9,7 +9,11 @@ namespace spdlog { namespace level { -static FMT_CONSTEXPR string_view_t level_string_views[] SPDLOG_LEVEL_NAMES; + +#if __cplusplus >= 201402L +constexpr +#endif +static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES; static const char *short_level_names[] SPDLOG_SHORT_LEVEL_NAMES;