diff --git a/include/fmt/base.h b/include/fmt/base.h index e3fc5c3e98c8..d4a3474de552 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -621,11 +621,12 @@ 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