[gcc r16-7354] libstdc++: fix C++17 regression in concept __heterogeneous_key
Nathan Myers
ncm@gcc.gnu.org
Fri Feb 6 08:25:51 GMT 2026
https://gcc.gnu.org/g:786e316de5c25a3fddeaa2003f6efb64fb5ab4a9
commit r16-7354-g786e316de5c25a3fddeaa2003f6efb64fb5ab4a9
Author: Nathan Myers <ncm@cantrip.org>
Date: Fri Feb 6 03:09:39 2026 -0500
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.
Diff:
---
libstdc++-v3/include/bits/stl_function.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h
index edbbfe11b96f..657f40bca2ee 100644
--- a/libstdc++-v3/include/bits/stl_function.h
+++ b/libstdc++-v3/include/bits/stl_function.h
@@ -1533,7 +1533,8 @@ template <typename _Kt, typename _Container>
template <typename _Kt, typename _Container>
concept __heterogeneous_key =
- (!is_same_v<typename _Container::key_type, remove_cvref_t<_Kt>>) &&
+ (!is_same_v<typename _Container::key_type,
+ typename remove_cvref<_Kt>::type>) &&
__not_container_iterator<_Kt, _Container>;
#endif
More information about the Libstdc++-cvs
mailing list