diff --git a/include/spdlog/common.h b/include/spdlog/common.h index e9d18e2c..b048ac07 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -138,15 +138,15 @@ struct source_loc template struct format_string_wrapper { - format_string_wrapper(const char *fmt, details::source_location loc = details::source_location::current()) + SPDLOG_CONSTEXPR format_string_wrapper(const char *fmt, details::source_location loc = details::source_location::current()) : fmt_{fmt} , loc_{loc} {} - T fmt() + SPDLOG_CONSTEXPR T fmt() { return fmt_; } - source_loc loc() + SPDLOG_CONSTEXPR source_loc loc() { return source_loc{loc_.file_name(), loc_.line(), loc_.function_name()}; }