forked from fmtlib/fmt
Add 2 more constexprs to fix compile error (#4065)
This commit is contained in:
@ -621,11 +621,12 @@ namespace detail {
|
|||||||
// to it, deducing Char. Explicitly convertible types such as the ones returned
|
// to it, deducing Char. Explicitly convertible types such as the ones returned
|
||||||
// from FMT_STRING are intentionally excluded.
|
// from FMT_STRING are intentionally excluded.
|
||||||
template <typename Char, FMT_ENABLE_IF(is_char<Char>::value)>
|
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;
|
return s;
|
||||||
}
|
}
|
||||||
template <typename T, FMT_ENABLE_IF(is_std_string_like<T>::value)>
|
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;
|
return s;
|
||||||
}
|
}
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
|
Reference in New Issue
Block a user