From e99ef3f9f91a9771c681b563f59c4410fe6043ec Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 29 Jan 2026 06:34:24 -0800 Subject: [PATCH] Relax constexpr --- include/fmt/base.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index e01dbb2b..c4e61207 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -495,10 +495,10 @@ struct is_back_insert_iterator< // Extracts a reference to the container from *insert_iterator. template -inline FMT_CONSTEXPR20 auto get_container(OutputIt it) -> +inline FMT_CONSTEXPR auto get_container(OutputIt it) -> typename OutputIt::container_type& { struct accessor : OutputIt { - FMT_CONSTEXPR20 accessor(OutputIt base) : OutputIt(base) {} + constexpr accessor(OutputIt base) : OutputIt(base) {} using OutputIt::container; }; return *accessor(it).container; @@ -2078,8 +2078,7 @@ template ::value&& has_back_insert_iterator_container_append< OutputIt, InputIt>::value)> -FMT_CONSTEXPR20 auto copy(InputIt begin, InputIt end, OutputIt out) - -> OutputIt { +FMT_CONSTEXPR auto copy(InputIt begin, InputIt end, OutputIt out) -> OutputIt { get_container(out).append(begin, end); return out; } @@ -2090,8 +2089,7 @@ template ::value && has_back_insert_iterator_container_insert_at_end< OutputIt, InputIt>::value)> -FMT_CONSTEXPR20 auto copy(InputIt begin, InputIt end, OutputIt out) - -> OutputIt { +FMT_CONSTEXPR auto copy(InputIt begin, InputIt end, OutputIt out) -> OutputIt { auto& c = get_container(out); c.insert(c.end(), begin, end); return out;