From 0ed2a65a8af5dd249562e8b59fd9981276b0d89b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 27 Apr 2025 11:08:27 -0700 Subject: [PATCH] Clarify why we use __builtin_strlen instead of strlen --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 9ca16692..c0216f9d 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -540,7 +540,7 @@ template class basic_string_view { FMT_CONSTEXPR20 basic_string_view(const Char* s) : data_(s) { #if FMT_HAS_BUILTIN(__builtin_strlen) || FMT_GCC_VERSION || FMT_CLANG_VERSION if (std::is_same::value && !detail::is_constant_evaluated()) { - size_ = __builtin_strlen(detail::narrow(s)); + size_ = __builtin_strlen(detail::narrow(s)); // strlen is not costexpr. return; } #endif