From 294bda0eba0ea615bb95d841d9853cc0761901f2 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Wed, 10 Jul 2024 20:36:52 -0400 Subject: [PATCH 1/2] more constexpr --- include/fmt/base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index c95ca6a48ca7..7253148a6f46 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -612,11 +612,11 @@ namespace detail { // to it, deducing Char. Explicitly convertible types such as the ones returned // from FMT_STRING are intentionally excluded. template ::value)> -auto to_string_view(const Char* s) -> basic_string_view { +constexpr auto to_string_view(const Char* s) -> basic_string_view { return s; } template ::value)> -auto to_string_view(const T& s) -> basic_string_view { +constexpr auto to_string_view(const T& s) -> basic_string_view { return s; } template From 6dc621a71be5823eb0fc9ade10c55cf42bdbbe3f Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Sat, 13 Jul 2024 09:46:48 -0400 Subject: [PATCH 2/2] format --- include/fmt/base.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 7253148a6f46..1fb52eac2abc 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -616,7 +616,8 @@ constexpr auto to_string_view(const Char* s) -> basic_string_view { return s; } template ::value)> -constexpr auto to_string_view(const T& s) -> basic_string_view { +constexpr auto to_string_view(const T& s) + -> basic_string_view { return s; } template