@@ -98,7 +98,7 @@ __root, have a non-null __parent_ field.
98
98
// Returns: true if __x is a left child of its parent, else false
99
99
// Precondition: __x != nullptr.
100
100
template <class _NodePtr >
101
- inline _LIBCPP_HIDE_FROM_ABI bool __tree_is_left_child (_NodePtr __x) _NOEXCEPT {
101
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 bool __tree_is_left_child (_NodePtr __x) _NOEXCEPT {
102
102
return __x == __x->__parent_ ->__left_ ;
103
103
}
104
104
@@ -164,7 +164,7 @@ inline _LIBCPP_HIDE_FROM_ABI _NodePtr __tree_min(_NodePtr __x) _NOEXCEPT {
164
164
165
165
// Returns: pointer to the right-most node under __x.
166
166
template <class _NodePtr >
167
- inline _LIBCPP_HIDE_FROM_ABI _NodePtr __tree_max (_NodePtr __x) _NOEXCEPT {
167
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 _NodePtr __tree_max (_NodePtr __x) _NOEXCEPT {
168
168
_LIBCPP_ASSERT_INTERNAL (__x != nullptr , " Root node shouldn't be null" );
169
169
while (__x->__right_ != nullptr )
170
170
__x = __x->__right_ ;
@@ -195,7 +195,7 @@ inline _LIBCPP_HIDE_FROM_ABI _EndNodePtr __tree_next_iter(_NodePtr __x) _NOEXCEP
195
195
// Returns: pointer to the previous in-order node before __x.
196
196
// Note: __x may be the end node.
197
197
template <class _NodePtr , class _EndNodePtr >
198
- inline _LIBCPP_HIDE_FROM_ABI _NodePtr __tree_prev_iter (_EndNodePtr __x) _NOEXCEPT {
198
+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 _NodePtr __tree_prev_iter (_EndNodePtr __x) _NOEXCEPT {
199
199
_LIBCPP_ASSERT_INTERNAL (__x != nullptr , " node shouldn't be null" );
200
200
if (__x->__left_ != nullptr )
201
201
return std::__tree_max (__x->__left_ );
@@ -226,7 +226,7 @@ _LIBCPP_HIDE_FROM_ABI _NodePtr __tree_leaf(_NodePtr __x) _NOEXCEPT {
226
226
// Effects: Makes __x->__right_ the subtree root with __x as its left child
227
227
// while preserving in-order order.
228
228
template <class _NodePtr >
229
- _LIBCPP_HIDE_FROM_ABI void __tree_left_rotate (_NodePtr __x) _NOEXCEPT {
229
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree_left_rotate (_NodePtr __x) _NOEXCEPT {
230
230
_LIBCPP_ASSERT_INTERNAL (__x != nullptr , " node shouldn't be null" );
231
231
_LIBCPP_ASSERT_INTERNAL (__x->__right_ != nullptr , " node should have a right child" );
232
232
_NodePtr __y = __x->__right_ ;
@@ -269,7 +269,7 @@ _LIBCPP_HIDE_FROM_ABI void __tree_right_rotate(_NodePtr __x) _NOEXCEPT {
269
269
// Postcondition: __tree_invariant(end_node->__left_) == true. end_node->__left_
270
270
// may be different than the value passed in as __root.
271
271
template <class _NodePtr >
272
- _LIBCPP_HIDE_FROM_ABI void __tree_balance_after_insert (_NodePtr __root, _NodePtr __x) _NOEXCEPT {
272
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree_balance_after_insert (_NodePtr __root, _NodePtr __x) _NOEXCEPT {
273
273
_LIBCPP_ASSERT_INTERNAL (__root != nullptr , " Root of the tree shouldn't be null" );
274
274
_LIBCPP_ASSERT_INTERNAL (__x != nullptr , " Can't attach null node to a leaf" );
275
275
__x->__is_black_ = __x == __root;
@@ -645,9 +645,9 @@ public:
645
645
__parent_pointer __parent_;
646
646
bool __is_black_;
647
647
648
- _LIBCPP_HIDE_FROM_ABI pointer __parent_unsafe () const { return static_cast <pointer>(__parent_); }
648
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 pointer __parent_unsafe () const { return static_cast <pointer>(__parent_); }
649
649
650
- _LIBCPP_HIDE_FROM_ABI void __set_parent (pointer __p) { __parent_ = static_cast <__parent_pointer>(__p); }
650
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __set_parent (pointer __p) { __parent_ = static_cast <__parent_pointer>(__p); }
651
651
652
652
653
653
// template <typename... Args> constexpr __tree_node_base(Args && ... args) =default;
@@ -960,19 +960,19 @@ public:
960
960
_LIBCPP_HIDE_FROM_ABI allocator_type __alloc () const _NOEXCEPT { return allocator_type (__node_alloc ()); }
961
961
962
962
private:
963
- _LIBCPP_HIDE_FROM_ABI size_type& size () _NOEXCEPT { return __size_; }
963
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type& size () _NOEXCEPT { return __size_; }
964
964
965
965
public:
966
- _LIBCPP_HIDE_FROM_ABI const size_type& size () const _NOEXCEPT { return __size_; }
967
- _LIBCPP_HIDE_FROM_ABI value_compare& value_comp () _NOEXCEPT { return __value_comp_; }
968
- _LIBCPP_HIDE_FROM_ABI const value_compare& value_comp () const _NOEXCEPT { return __value_comp_; }
966
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const size_type& size () const _NOEXCEPT { return __size_; }
967
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 value_compare& value_comp () _NOEXCEPT { return __value_comp_; }
968
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const value_compare& value_comp () const _NOEXCEPT { return __value_comp_; }
969
969
970
970
public:
971
- _LIBCPP_HIDE_FROM_ABI __node_pointer __root () const _NOEXCEPT {
971
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __node_pointer __root () const _NOEXCEPT {
972
972
return static_cast <__node_pointer>(__end_node ()->__left_ );
973
973
}
974
974
975
- _LIBCPP_HIDE_FROM_ABI __node_base_pointer* __root_ptr () const _NOEXCEPT {
975
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __node_base_pointer* __root_ptr () const _NOEXCEPT {
976
976
return std::addressof (__end_node ()->__left_ );
977
977
}
978
978
@@ -1183,7 +1183,7 @@ public:
1183
1183
template <class _Key >
1184
1184
_LIBCPP_HIDE_FROM_ABI size_type __erase_multi (const _Key& __k);
1185
1185
1186
- _LIBCPP_HIDE_FROM_ABI void
1186
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
1187
1187
__insert_node_at (__parent_pointer __parent, __node_base_pointer& __child, __node_base_pointer __new_node) _NOEXCEPT;
1188
1188
1189
1189
template <class _Key >
@@ -1764,7 +1764,7 @@ typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& __tree<_Tp, _Co
1764
1764
}
1765
1765
1766
1766
template <class _Tp , class _Compare , class _Allocator >
1767
- void __tree<_Tp, _Compare, _Allocator>::__insert_node_at(
1767
+ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree<_Tp, _Compare, _Allocator>::__insert_node_at(
1768
1768
__parent_pointer __parent, __node_base_pointer& __child, __node_base_pointer __new_node) _NOEXCEPT {
1769
1769
__new_node->__left_ = nullptr ;
1770
1770
__new_node->__right_ = nullptr ;
0 commit comments