Re: [r16-7292 Regression] FAIL: g++.dg/concepts/expression.C -std=gnu++17 (test for excess errors) on Linux/x86_64

Jakub Jelinek <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.regression
Message-ID <aYWn7d87noaYgQby@tucnak>
On Fri, Feb 06, 2026 at 03:30:27AM -0500, Nathan Myers wrote:
> Fixed in 786e316de5c25a3fddeaa2003f6efb64fb5ab4a9  2026-02-06 03:25:21
> 
>     libstdc++: fix C++17 regression in concept __heterogeneous_key
> 
>     The commit 3f7905550483408a2c4c5096a1adc8d7e863eb12 defined a
>     concept using a name not defined in C++17. This is fixed by
>     using an older name.
> 
>     https://gcc.gnu.org/pipermail/gcc-patches/2026-February/707814.html
> 
>     libstdc++-v3/ChangeLog
>     	* include/bits/stl_function.h (__heterogeneous_key): Use
>     	C++17-defined remove_cvref<>::type instead.

Does that really work?

remove_cvref is also C++20 like remove_cvref_t, only __remove_cvref_t
is C++11 and later.

#ifdef __cpp_lib_remove_cvref // C++ >= 20
# if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_cvref)
  template<typename _Tp>
    struct remove_cvref
    { using type = __remove_cvref(_Tp); };
# else
  template<typename _Tp>
    struct remove_cvref
    { using type = typename remove_cv<_Tp>::type; };
             
  template<typename _Tp>
    struct remove_cvref<_Tp&>
    { using type = typename remove_cv<_Tp>::type; };
    
  template<typename _Tp>
    struct remove_cvref<_Tp&&>
    { using type = typename remove_cv<_Tp>::type; };
# endif
    
  template<typename _Tp>
    using remove_cvref_t = typename remove_cvref<_Tp>::type;
  /// @}
#endif // __cpp_lib_remove_cvref

	Jakub
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.