libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ equal_range() [1/2]

template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc>
pair< typename _Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc >::iterator, typename _Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc >::iterator > std::_Rb_tree< _Key, _Val, _KeyOfValue, _Compare, _Alloc >::equal_range ( const key_type & __k)

Definition at line 2704 of file stl_tree.h.

2706 {
2708
2710 _Base_ptr __y = _M_end();
2711 while (__x)
2712 {
2714 __x = _S_right(__x);
2715 else if (_M_key_compare(__k, _S_key(__x)))
2716 __y = __x, __x = _S_left(__x);
2717 else
2718 {
2721 __y = __x, __x = _S_left(__x);
2722 __xu = _S_right(__xu);
2725 }
2726 }
2727 return _Ret(iterator(__y), iterator(__y));
2728 }
@ _S_right
Definition ios_base.h:68
@ _S_left
Definition ios_base.h:66
_Base_ptr _M_end() const noexcept
Definition stl_tree.h:1390
static const _Key & _S_key(const _Node &__node)
Definition stl_tree.h:1410
bool _M_key_compare(const _Key1 &__k1, const _Key2 &__k2) const
Definition stl_tree.h:1397
_Node_traits::_Base_ptr _Base_ptr
Definition stl_tree.h:1038
_Node_traits::_Iterator iterator
Definition stl_tree.h:1446
_Base_ptr _M_lower_bound(_Base_ptr __x, _Base_ptr __y, const _Key &__k) const
Definition stl_tree.h:2641
_Base_ptr _M_begin() const noexcept
Definition stl_tree.h:1377
_Base_ptr _M_upper_bound(_Base_ptr __x, _Base_ptr __y, const _Key &__k) const
Definition stl_tree.h:2672

References _Rb_tree(), _M_begin(), _M_end(), _M_key_compare(), _M_lower_bound(), _M_upper_bound(), _S_key(), _S_left(), and _S_right().

Referenced by count(), and erase().

Here is the call graph for this function:
Here is the caller graph for this function: