diff --git a/include/fmt/core.h b/include/fmt/core.h index f1684657..32d0668f 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -392,12 +392,14 @@ template class basic_string_view { the size with ``std::char_traits::length``. \endrst */ -// C++17's char_traits::length() is constexpr. #if __cplusplus >= 201703L constexpr #endif - FMT_INLINE basic_string_view(const Char* s) : data_(s) { - if (detail::const_check(std::is_same::value && !detail::is_constant_evaluated())) + FMT_INLINE + basic_string_view(const Char* s) + : data_(s) { + if (detail::const_check(std::is_same::value && + !detail::is_constant_evaluated())) size_ = std::strlen(reinterpret_cast(s)); else size_ = std::char_traits::length(s);