https://gcc.gnu.org/g:9b85fcc00ebe850f2ee2c19a0208534544b088a8
commit r16-7363-g9b85fcc00ebe850f2ee2c19a0208534544b088a8 Author: Tomasz KamiĆski <[email protected]> Date: Fri Feb 6 12:03:37 2026 +0100 libstdc++: Update guards on __heterogeneous_hash_key and __heterogeneous_tree_key The r16-7359-gae04c1afd1526a changed __heterogeneous_key to be defined if __glibcxx_associative_heterogeneous_erasure, but missed guards on derived __heterogeneous_hash_key and __heterogeneous_tree_key concept. libstdc++-v3/ChangeLog: * include/bits/hashtable.h (std::__heterogeneous_hash_key) [__glibcxx_associative_heterogeneous_erasure]: Changed guard. * include/bits/stl_tree.h (std::__heterogeneous_tree_key) [__glibcxx_associative_heterogeneous_erasure]: Likewise. * include/bits/stl_function.h: Add comment with C++ version for __glibcxx_associative_heterogeneous_erasure guard. Diff: --- libstdc++-v3/include/bits/hashtable.h | 2 +- libstdc++-v3/include/bits/stl_function.h | 2 +- libstdc++-v3/include/bits/stl_tree.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index f7b8905d8ab9..48695c013f38 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -3012,7 +3012,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = __enable_if_t<!__or_<is_integral<_Hash>, __is_allocator<_Hash>>::value>; #endif -#ifdef __cpp_concepts +#ifdef __glibcxx_associative_heterogeneous_erasure // C++ >= 23 template <typename _Kt, typename _Container> concept __heterogeneous_hash_key = __transparent_comparator<typename _Container::hasher> && diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h index 1312564216bd..95c24d44b9ef 100644 --- a/libstdc++-v3/include/bits/stl_function.h +++ b/libstdc++-v3/include/bits/stl_function.h @@ -1525,7 +1525,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif #endif -#ifdef __glibcxx_associative_heterogeneous_erasure +#ifdef __glibcxx_associative_heterogeneous_erasure // C++ >= 23 template <typename _Kt, typename _Container> concept __not_container_iterator = (!is_convertible_v<_Kt&&, typename _Container::iterator> && diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index 7a733241ec5b..5d361b55028f 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -3315,7 +3315,7 @@ namespace __rb_tree }; #endif // C++17 -#ifdef __cpp_concepts +#ifdef __glibcxx_associative_heterogeneous_erasure // C++ >= 23 template <typename _Kt, typename _Container> concept __heterogeneous_tree_key = __transparent_comparator<typename _Container::key_compare> &&
