Skip to content

Commit

Permalink
Add 2 more constexprs to fix compile error (#4065)
Browse files Browse the repository at this point in the history
  • Loading branch information
torshepherd committed Jul 13, 2024
1 parent 33e7ed1 commit 3fe4641
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 3fe4641

Please sign in to comment.