diff --git a/include/fmt/core.h b/include/fmt/core.h index 19cb05b5..f88b4cfe 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -396,7 +396,7 @@ template class basic_string_view { FMT_CONSTEXPR #endif FMT_INLINE basic_string_view(const Char* s) : data_(s) { - if (std::is_same::value) + if (std::is_same::value && !detail::is_constant_evaluated()) size_ = std::strlen(reinterpret_cast(s)); else size_ = std::char_traits::length(s);