mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-25 11:40:06 +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
|
||||
// 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>
|
||||
|
Loading…
Reference in New Issue
Block a user