From 0893c9c2ef1971792950b447e92269f75e3485f8 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 30 May 2020 17:57:57 -0700 Subject: [PATCH] Inline parse_format_string --- include/fmt/core.h | 2 +- include/fmt/format.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index b2236b33..7df62b00 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -170,7 +170,7 @@ #endif #ifndef FMT_INLINE -# if FMT_GCC_VERSION && FMT_USE_CONSTEXPR +# if FMT_GCC_VERSION || FMT_CLANG_VERSION # define FMT_INLINE inline __attribute__((always_inline)) # else # define FMT_INLINE inline diff --git a/include/fmt/format.h b/include/fmt/format.h index d9b58eaa..32d27e87 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2475,8 +2475,8 @@ template struct id_adapter { }; template -FMT_CONSTEXPR void parse_format_string(basic_string_view format_str, - Handler&& handler) { +FMT_CONSTEXPR_DECL FMT_INLINE void parse_format_string( + basic_string_view format_str, Handler&& handler) { struct writer { FMT_CONSTEXPR void operator()(const Char* begin, const Char* end) { if (begin == end) return;