mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-08 07:28:06 +01:00
Update to boost v1.63.0
This commit is contained in:
parent
f005c955f8
commit
25db91d480
535 changed files with 20797 additions and 37185 deletions
|
|
@ -22,6 +22,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/std_fwd.hpp>
|
||||
#include <boost/intrusive/detail/iiterator.hpp>
|
||||
#include <boost/intrusive/detail/bstree_algorithms_base.hpp>
|
||||
|
|
@ -56,27 +57,27 @@ class tree_iterator
|
|||
typedef void (tree_iterator::*unspecified_bool_type)() const;
|
||||
|
||||
public:
|
||||
typedef typename types_t::iterator_traits::difference_type difference_type;
|
||||
typedef typename types_t::iterator_traits::value_type value_type;
|
||||
typedef typename types_t::iterator_traits::pointer pointer;
|
||||
typedef typename types_t::iterator_traits::reference reference;
|
||||
typedef typename types_t::iterator_traits::iterator_category iterator_category;
|
||||
typedef typename types_t::iterator_type::difference_type difference_type;
|
||||
typedef typename types_t::iterator_type::value_type value_type;
|
||||
typedef typename types_t::iterator_type::pointer pointer;
|
||||
typedef typename types_t::iterator_type::reference reference;
|
||||
typedef typename types_t::iterator_type::iterator_category iterator_category;
|
||||
|
||||
tree_iterator()
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator()
|
||||
{}
|
||||
|
||||
explicit tree_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit tree_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
tree_iterator(tree_iterator<value_traits, false> const& other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator(tree_iterator<value_traits, false> const& other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
const node_ptr &pointed_node() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
tree_iterator &operator=(const node_ptr &nodeptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const node_ptr &nodeptr)
|
||||
{ members_.nodeptr_ = nodeptr; return static_cast<tree_iterator&>(*this); }
|
||||
|
||||
public:
|
||||
|
|
@ -106,34 +107,43 @@ class tree_iterator
|
|||
return result;
|
||||
}
|
||||
|
||||
void go_left()
|
||||
{ members_.nodeptr_ = node_traits::get_left(members_.nodeptr_); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_left()
|
||||
{
|
||||
members_.nodeptr_ = node_traits::get_left(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
}
|
||||
|
||||
void go_right()
|
||||
{ members_.nodeptr_ = node_traits::get_right(members_.nodeptr_); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_right()
|
||||
{
|
||||
members_.nodeptr_ = node_traits::get_right(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
}
|
||||
|
||||
void go_parent()
|
||||
{ members_.nodeptr_ = node_traits::get_parent(members_.nodeptr_); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_parent()
|
||||
{
|
||||
members_.nodeptr_ = node_traits::get_parent(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
}
|
||||
|
||||
operator unspecified_bool_type() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE operator unspecified_bool_type() const
|
||||
{ return members_.nodeptr_ ? &tree_iterator::unspecified_bool_type_func : 0; }
|
||||
|
||||
bool operator! () const
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator! () const
|
||||
{ return !members_.nodeptr_; }
|
||||
|
||||
friend bool operator== (const tree_iterator& l, const tree_iterator& r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const tree_iterator& l, const tree_iterator& r)
|
||||
{ return l.pointed_node() == r.pointed_node(); }
|
||||
|
||||
friend bool operator!= (const tree_iterator& l, const tree_iterator& r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const tree_iterator& l, const tree_iterator& r)
|
||||
{ return !(l == r); }
|
||||
|
||||
reference operator*() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
|
||||
{ return *operator->(); }
|
||||
|
||||
pointer operator->() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
|
||||
{ return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
|
||||
|
||||
const_value_traits_ptr get_value_traits() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
|
||||
{ return members_.get_ptr(); }
|
||||
|
||||
tree_iterator end_iterator_from_it() const
|
||||
|
|
@ -145,10 +155,10 @@ class tree_iterator
|
|||
{ return tree_iterator<value_traits, false>(this->pointed_node(), this->get_value_traits()); }
|
||||
|
||||
private:
|
||||
pointer operator_arrow(detail::false_) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
|
||||
{ return ValueTraits::to_value_ptr(members_.nodeptr_); }
|
||||
|
||||
pointer operator_arrow(detail::true_) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
|
||||
{ return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
|
||||
|
||||
iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue