Add 2 more constexprs to fix compile error (#4065)

This commit is contained in:
Tor Shepherd 2024-07-13 11:23:49 -04:00 committed by GitHub
parent 33e7ed1eb5
commit 3fe4641d3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 <typename Char, FMT_ENABLE_IF(is_char<Char>::value)>
auto to_string_view(const Char* s) -> basic_string_view<Char> {
constexpr auto to_string_view(const Char* s) -> basic_string_view<Char> {
return s;
}
template <typename T, FMT_ENABLE_IF(is_std_string_like<T>::value)>
auto to_string_view(const T& s) -> basic_string_view<typename T::value_type> {
constexpr auto to_string_view(const T& s)
-> basic_string_view<typename T::value_type> {
return s;
}
template <typename Char>