This fixes:
FAIL: 17_intro/badnames.cc  -std=gnu++26 (test for excess errors)

libstdc++-v3/ChangeLog:

        * include/std/type_traits (constant_wrapper): Rename template
        parameter to avoid BADNAME.
---

We avoid single letter template parameter names, as per:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html#coding_style.bad_identifiers

Pushed to trunk.

 libstdc++-v3/include/std/type_traits | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/std/type_traits 
b/libstdc++-v3/include/std/type_traits
index 26cbbb4fd5ba..42a1e7f1732b 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3/include/std/type_traits
@@ -4648,12 +4648,12 @@ template<typename _Ret, typename _Fn, typename... _Args>
       }
   };
 
-  template<_CwFixedValue _X, typename>
+  template<_CwFixedValue _Xv, typename>
   struct constant_wrapper : _CwOperators
   {
-    static constexpr const auto& value = _X._M_data;
+    static constexpr const auto& value = _Xv._M_data;
     using type = constant_wrapper;
-    using value_type = typename decltype(_X)::_S_type;
+    using value_type = typename decltype(_Xv)::_S_type;
 
     template<_ConstExprParam _Right>
       constexpr auto
-- 
2.51.0

Reply via email to