Re: [r16-7292 Regression] FAIL: g++.dg/concepts/expression.C -std=gnu++17 (test for excess errors) on Linux/x86_64
Torbjorn SVENSSON via Gcc-regression <[email protected]>
| Newsgroups | gmane.comp.gcc.regression,gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I think this is breaking trunk right now.
When I try to build r16-7359-gae04c1afd1526a for x86_64-pc-linux-gnu, I get the following error:
In file included from /build/native/gcc/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/map:64,
from /build/src/gcc/gcc/system.h:211,
from /build/src/gcc/gcc/auto-profile.cc:24:
/build/native/gcc/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_tree.h:3322:5: error: ‘__heterogeneous_key’ was not declared in this scope
3322 | __heterogeneous_key<_Kt, _Container>;
| ^~~~~~~~~~~~~~~~~~~
/build/native/gcc/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_tree.h:3322:28: error: expected primary-expression before ‘,’ token
3322 | __heterogeneous_key<_Kt, _Container>;
|
Reverting r16-7359-gae04c1afd1526a and r16-7354-g786e316de5c25a restores the build.
Kind regards,
Torbjörn
On 2026-02-06 09:52, Nathan Myers wrote:
> On 2/6/26 3:35 AM, Jakub Jelinek wrote:
>> 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?
>
> It doesn't. I had checked the wrong test results.
>
> I will post a regular [PATCH] and wait for approval.
>
>> 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
>>
>