]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Do not define _Insert_base::try_emplace before C++17
authorJonathan Wakely <jwakely@redhat.com>
Fri, 8 Nov 2024 13:58:23 +0000 (13:58 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 11 Nov 2024 18:45:52 +0000 (18:45 +0000)
commit2f744df601b298e31dcdb49316da93f0ce1f00b7
tree2e7ad072e884ca472bb2f7da14a3372948e4f742
parent4380d6f8acc878fbdeb6ce86f4be64d340bdfd4b
libstdc++: Do not define _Insert_base::try_emplace before C++17

This is not a reserved name in C++11 and C++14, so must not be defined.

Also use the appropriate feature test macros for the try_emplace members
of the Debug Mode maps.

libstdc++-v3/ChangeLog:

* include/bits/hashtable_policy.h (_Insert_base::try_emplace):
Do not define for C++11 and C++14.
* include/debug/map.h (try_emplace): Use feature test macro.
* include/debug/unordered_map (try_emplace): Likewise.
* testsuite/17_intro/names.cc: Define try_emplace before C++17.

(cherry picked from commit b66a57c0ad300b293ebd366bc29f44f2ddb65c69)
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/testsuite/17_intro/names.cc