From abfd3ed3a51b486b943c871d4a4b6a1d3535ac3a Mon Sep 17 00:00:00 2001 From: Ben Deane Date: Fri, 6 Feb 2026 09:21:46 -0700 Subject: [PATCH] :rotating_light: :bug: Work around GCC 14 bug Problem: - GCC 14 is confused by inlining a size calculation as a template argument. Solution: - Precompute the size. --- include/stdx/ct_format.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/stdx/ct_format.hpp b/include/stdx/ct_format.hpp index 7e6ddec..b023483 100644 --- a/include/stdx/ct_format.hpp +++ b/include/stdx/ct_format.hpp @@ -281,7 +281,8 @@ constexpr auto operator+(format_result r, S s) { template constexpr auto operator+(S s, format_result r) { - return make_format_result>( + constexpr auto sz = s.size(); + return make_format_result>( s + r.str, std::move(r.args)); } @@ -289,8 +290,9 @@ template constexpr auto operator+(format_result r1, format_result r2) { + constexpr auto sz = r1.str.size(); using ShiftedNamedArgs2 = - detail::apply_offset::value, + detail::apply_offset::value, NamedArgs2>; return make_format_result<