diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-06-04 15:59:37 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-06-04 15:59:37 +0100 |
commit | f78f25f43864f38ae5a6a9fcce8f26c94fe45bcd (patch) | |
tree | 7546d834d06dc0567bd6ce1b8119ebd890999895 /libstdc++-v3/include | |
parent | ad3f0ad4bafe377072a53ded468fd9948e659f46 (diff) | |
download | gcc-f78f25f43864f38ae5a6a9fcce8f26c94fe45bcd.zip gcc-f78f25f43864f38ae5a6a9fcce8f26c94fe45bcd.tar.gz gcc-f78f25f43864f38ae5a6a9fcce8f26c94fe45bcd.tar.bz2 |
libstdc++: Add feature test macro for heterogeneous lookup in unordered containers
Also update the C++20 status docs.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* doc/xml/manual/status_cxx2020.xml:
* doc/html/*: Regenerate.
* include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup):
Define.
* include/std/version (__cpp_lib_generic_unordered_lookup):
Define.
* testsuite/23_containers/unordered_map/operations/1.cc: Check
feature test macro.
* testsuite/23_containers/unordered_set/operations/1.cc:
Likewise.
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/hashtable.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/std/version | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index 4bdbe7d..dfc2a2a 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -735,7 +735,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const; -#if __cplusplus > 201702L +#if __cplusplus >= 202002L +#define __cpp_lib_generic_unordered_lookup 201811L + template<typename _Kt, typename = __has_is_transparent_t<_Hash, _Kt>, typename = __has_is_transparent_t<_Equal, _Kt>> @@ -765,7 +767,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename = __has_is_transparent_t<_Equal, _Kt>> pair<const_iterator, const_iterator> _M_equal_range_tr(const _Kt& __k) const; -#endif +#endif // C++20 private: // Bucket index computation helpers. diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index ea0e18a..8d0b2b9 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -169,7 +169,7 @@ #define __cpp_lib_variant 201606L #endif -#if __cplusplus > 201703L +#if __cplusplus >= 202002L // c++20 #define __cpp_lib_atomic_flag_test 201907L #define __cpp_lib_atomic_float 201711L @@ -225,6 +225,7 @@ #define __cpp_lib_constexpr_tuple 201811L #define __cpp_lib_constexpr_utility 201811L #define __cpp_lib_erase_if 202002L +#define __cpp_lib_generic_unordered_lookup 201811L #define __cpp_lib_interpolate 201902L #ifdef _GLIBCXX_HAS_GTHREADS # define __cpp_lib_jthread 201911L |