mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-22 10:30:05 +00:00
Add 2 more constexprs to fix compile error (#4065)
This commit is contained in:
parent
33e7ed1eb5
commit
3fe4641d3a
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user