diff --git a/include/fmt/base.h b/include/fmt/base.h index c95ca6a48ca7..1fb52eac2abc 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -612,11 +612,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