diff --git a/doc/intrusive.qbk b/doc/intrusive.qbk index 6f11a23..bdd28c5 100644 --- a/doc/intrusive.qbk +++ b/doc/intrusive.qbk @@ -3847,6 +3847,7 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std * [@https://svn.boost.org/trac/boost/ticket/12432 Boost Trac #12432: ['Forced KeyOfValue creation when using custom compare on insert_check]] * Implemented `merge` functions in ordered associative containers. +* Officially documented `root()` function for tree-based containers. [endsect] diff --git a/include/boost/intrusive/avl_set.hpp b/include/boost/intrusive/avl_set.hpp index b7e198c..d150140 100644 --- a/include/boost/intrusive/avl_set.hpp +++ b/include/boost/intrusive/avl_set.hpp @@ -155,6 +155,15 @@ class avl_set_impl //! @copydoc ::boost::intrusive::avltree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::avltree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::avltree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::avltree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator) static avl_set_impl &container_from_end_iterator(iterator end_iterator); @@ -683,6 +692,15 @@ class avl_multiset_impl //! @copydoc ::boost::intrusive::avltree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::avltree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::avltree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::avltree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator) static avl_multiset_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/avltree.hpp b/include/boost/intrusive/avltree.hpp index 6a4e098..cdc9b75 100644 --- a/include/boost/intrusive/avltree.hpp +++ b/include/boost/intrusive/avltree.hpp @@ -189,6 +189,15 @@ class avltree_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator) static avltree_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/bs_set.hpp b/include/boost/intrusive/bs_set.hpp index 75d334c..693b6d8 100644 --- a/include/boost/intrusive/bs_set.hpp +++ b/include/boost/intrusive/bs_set.hpp @@ -152,6 +152,15 @@ class bs_set_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator) static bs_set_impl &container_from_end_iterator(iterator end_iterator); @@ -679,6 +688,15 @@ class bs_multiset_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator) static bs_multiset_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/rbtree.hpp b/include/boost/intrusive/rbtree.hpp index 698de0f..4f5d86d 100644 --- a/include/boost/intrusive/rbtree.hpp +++ b/include/boost/intrusive/rbtree.hpp @@ -188,6 +188,15 @@ class rbtree_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator) static rbtree_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/set.hpp b/include/boost/intrusive/set.hpp index 9b9a963..3cd9013 100644 --- a/include/boost/intrusive/set.hpp +++ b/include/boost/intrusive/set.hpp @@ -155,6 +155,15 @@ class set_impl //! @copydoc ::boost::intrusive::rbtree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::rbtree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::rbtree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::rbtree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator) static set_impl &container_from_end_iterator(iterator end_iterator); @@ -683,6 +692,15 @@ class multiset_impl //! @copydoc ::boost::intrusive::rbtree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::rbtree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::rbtree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::rbtree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator) static multiset_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/sg_set.hpp b/include/boost/intrusive/sg_set.hpp index 8e1bfcc..745c379 100644 --- a/include/boost/intrusive/sg_set.hpp +++ b/include/boost/intrusive/sg_set.hpp @@ -153,6 +153,15 @@ class sg_set_impl //! @copydoc ::boost::intrusive::sgtree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::sgtree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::sgtree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::sgtree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator) static sg_set_impl &container_from_end_iterator(iterator end_iterator); @@ -692,6 +701,15 @@ class sg_multiset_impl //! @copydoc ::boost::intrusive::sgtree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::sgtree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::sgtree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::sgtree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator) static sg_multiset_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/sgtree.hpp b/include/boost/intrusive/sgtree.hpp index ce4c039..033efb8 100644 --- a/include/boost/intrusive/sgtree.hpp +++ b/include/boost/intrusive/sgtree.hpp @@ -382,6 +382,15 @@ class sgtree_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator) static sgtree_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/splay_set.hpp b/include/boost/intrusive/splay_set.hpp index e63a027..da7662e 100644 --- a/include/boost/intrusive/splay_set.hpp +++ b/include/boost/intrusive/splay_set.hpp @@ -153,6 +153,15 @@ class splay_set_impl //! @copydoc ::boost::intrusive::splaytree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::splaytree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::splaytree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::splaytree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator) static splay_set_impl &container_from_end_iterator(iterator end_iterator); @@ -704,6 +713,15 @@ class splay_multiset_impl //! @copydoc ::boost::intrusive::splaytree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::splaytree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::splaytree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::splaytree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator) static splay_multiset_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/splaytree.hpp b/include/boost/intrusive/splaytree.hpp index 1904e57..f6a1a93 100644 --- a/include/boost/intrusive/splaytree.hpp +++ b/include/boost/intrusive/splaytree.hpp @@ -183,6 +183,15 @@ class splaytree_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator) static splaytree_impl &container_from_end_iterator(iterator end_iterator); diff --git a/include/boost/intrusive/treap.hpp b/include/boost/intrusive/treap.hpp index aeef64c..8567072 100644 --- a/include/boost/intrusive/treap.hpp +++ b/include/boost/intrusive/treap.hpp @@ -274,6 +274,16 @@ class treap_impl //! @copydoc ::boost::intrusive::bstree::crend()const const_reverse_iterator crend() const; + + //! @copydoc ::boost::intrusive::bstree::root() + iterator root(); + + //! @copydoc ::boost::intrusive::bstree::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::bstree::croot()const + const_iterator croot() const; + #endif //! Effects: Returns a reverse_iterator pointing to the highest priority object of the diff --git a/include/boost/intrusive/treap_set.hpp b/include/boost/intrusive/treap_set.hpp index 0c4e2d0..bf162ba 100644 --- a/include/boost/intrusive/treap_set.hpp +++ b/include/boost/intrusive/treap_set.hpp @@ -160,6 +160,15 @@ class treap_set_impl //! @copydoc ::boost::intrusive::treap::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::treap::root() + iterator root(); + + //! @copydoc ::boost::intrusive::treap::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::treap::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator) static treap_set_impl &container_from_end_iterator(iterator end_iterator); @@ -706,6 +715,15 @@ class treap_multiset_impl //! @copydoc ::boost::intrusive::treap::crend()const const_reverse_iterator crend() const; + //! @copydoc ::boost::intrusive::treap::root() + iterator root(); + + //! @copydoc ::boost::intrusive::treap::root()const + const_iterator root() const; + + //! @copydoc ::boost::intrusive::treap::croot()const + const_iterator croot() const; + //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator) static treap_multiset_impl &container_from_end_iterator(iterator end_iterator);