Replace some `__cplusplus > 201402L` preprocessor checks with more
expressive checks for the appropriate feature test macro.
libstdc++-v3/ChangeLog:
* include/bits/stl_map.h: Check __glibcxx_node_extract instead
of __cplusplus.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_tree.h: Likewise.
(cherry picked from commit
408f5b847b5b4e552274dc7b02ccaf106395936d)
typedef typename _Rep_type::reverse_iterator reverse_iterator;
typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
using node_type = typename _Rep_type::node_type;
using insert_return_type = typename _Rep_type::insert_return_type;
#endif
}
#endif
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
/// Extract a node.
node_type
extract(const_iterator __pos)
typedef typename _Rep_type::reverse_iterator reverse_iterator;
typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
using node_type = typename _Rep_type::node_type;
#endif
{ this->insert(__l.begin(), __l.end()); }
#endif
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
/// Extract a node.
node_type
extract(const_iterator __pos)
typedef typename _Rep_type::size_type size_type;
typedef typename _Rep_type::difference_type difference_type;
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
using node_type = typename _Rep_type::node_type;
#endif
{ this->insert(__l.begin(), __l.end()); }
#endif
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
/// Extract a node.
node_type
extract(const_iterator __pos)
typedef typename _Rep_type::difference_type difference_type;
///@}
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
using node_type = typename _Rep_type::node_type;
using insert_return_type = typename _Rep_type::insert_return_type;
#endif
{ this->insert(__l.begin(), __l.end()); }
#endif
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
/// Extract a node.
node_type
extract(const_iterator __pos)
#if __cplusplus >= 201103L
# include <ext/aligned_buffer.h>
#endif
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
# include <bits/node_handle.h>
#endif
_Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
_Rb_tree_node_base& __header) throw ();
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
template<typename _Tree1, typename _Cmp2>
struct _Rb_tree_merge_helper { };
#endif
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
using node_type = _Node_handle<_Key, _Val, _Node_allocator>;
using insert_return_type = _Node_insert_return<
__conditional_t<is_same_v<_Key, _Val>, const_iterator, iterator>,
return true;
}
-#if __cplusplus > 201402L
+#ifdef __glibcxx_node_extract // >= C++17
// Allow access to internals of compatible _Rb_tree specializations.
template<typename _Key, typename _Val, typename _Sel, typename _Cmp1,
typename _Alloc, typename _Cmp2>