Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/intrusive/avl_set.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
1 ///////////////////////////////////////////////////////////////////////////// | 1 ///////////////////////////////////////////////////////////////////////////// |
2 // | 2 // |
3 // (C) Copyright Ion Gaztanaga 2007-2013 | 3 // (C) Copyright Ion Gaztanaga 2007-2014 |
4 // | 4 // |
5 // Distributed under the Boost Software License, Version 1.0. | 5 // Distributed under the Boost Software License, Version 1.0. |
6 // (See accompanying file LICENSE_1_0.txt or copy at | 6 // (See accompanying file LICENSE_1_0.txt or copy at |
7 // http://www.boost.org/LICENSE_1_0.txt) | 7 // http://www.boost.org/LICENSE_1_0.txt) |
8 // | 8 // |
14 | 14 |
15 #include <boost/intrusive/detail/config_begin.hpp> | 15 #include <boost/intrusive/detail/config_begin.hpp> |
16 #include <boost/intrusive/intrusive_fwd.hpp> | 16 #include <boost/intrusive/intrusive_fwd.hpp> |
17 #include <boost/intrusive/avltree.hpp> | 17 #include <boost/intrusive/avltree.hpp> |
18 #include <boost/intrusive/detail/mpl.hpp> | 18 #include <boost/intrusive/detail/mpl.hpp> |
19 #include <boost/move/move.hpp> | 19 #include <boost/move/utility_core.hpp> |
20 #include <iterator> | 20 #include <boost/static_assert.hpp> |
21 | |
22 #if defined(BOOST_HAS_PRAGMA_ONCE) | |
23 # pragma once | |
24 #endif | |
21 | 25 |
22 namespace boost { | 26 namespace boost { |
23 namespace intrusive { | 27 namespace intrusive { |
24 | 28 |
25 //! The class template avl_set is an intrusive container, that mimics most of | 29 //! The class template avl_set is an intrusive container, that mimics most of |
34 //! \c constant_time_size<>, \c size_type<> and | 38 //! \c constant_time_size<>, \c size_type<> and |
35 //! \c compare<>. | 39 //! \c compare<>. |
36 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) | 40 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) |
37 template<class T, class ...Options> | 41 template<class T, class ...Options> |
38 #else | 42 #else |
39 template<class ValueTraits, class Compare, class SizeType, bool ConstantTimeSize> | 43 template<class ValueTraits, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder> |
40 #endif | 44 #endif |
41 class avl_set_impl | 45 class avl_set_impl |
42 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 46 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
43 : public bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms> | 47 : public bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> |
44 #endif | 48 #endif |
45 { | 49 { |
46 /// @cond | 50 /// @cond |
47 typedef bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms> tree_type; | 51 typedef bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type; |
48 BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set_impl) | 52 BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set_impl) |
49 | 53 |
50 typedef tree_type implementation_defined; | 54 typedef tree_type implementation_defined; |
51 /// @endcond | 55 /// @endcond |
52 | 56 |
90 : tree_type(true, b, e, cmp, v_traits) | 94 : tree_type(true, b, e, cmp, v_traits) |
91 {} | 95 {} |
92 | 96 |
93 //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&) | 97 //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&) |
94 avl_set_impl(BOOST_RV_REF(avl_set_impl) x) | 98 avl_set_impl(BOOST_RV_REF(avl_set_impl) x) |
95 : tree_type(::boost::move(static_cast<tree_type&>(x))) | 99 : tree_type(BOOST_MOVE_BASE(tree_type, x)) |
96 {} | 100 {} |
97 | 101 |
98 //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&) | 102 //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&) |
99 avl_set_impl& operator=(BOOST_RV_REF(avl_set_impl) x) | 103 avl_set_impl& operator=(BOOST_RV_REF(avl_set_impl) x) |
100 { return static_cast<avl_set_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); } | 104 { return static_cast<avl_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); } |
101 | 105 |
102 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 106 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
103 | 107 |
104 //! @copydoc ::boost::intrusive::avltree::~avltree() | 108 //! @copydoc ::boost::intrusive::avltree::~avltree() |
105 ~avl_set_impl(); | 109 ~avl_set_impl(); |
168 void swap(avl_set_impl& other); | 172 void swap(avl_set_impl& other); |
169 | 173 |
170 //! @copydoc ::boost::intrusive::avltree::clone_from | 174 //! @copydoc ::boost::intrusive::avltree::clone_from |
171 template <class Cloner, class Disposer> | 175 template <class Cloner, class Disposer> |
172 void clone_from(const avl_set_impl &src, Cloner cloner, Disposer disposer); | 176 void clone_from(const avl_set_impl &src, Cloner cloner, Disposer disposer); |
173 | 177 |
174 #endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED | 178 #endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED |
175 | 179 |
176 //! @copydoc ::boost::intrusive::avltree::insert_unique(reference) | 180 //! @copydoc ::boost::intrusive::avltree::insert_unique(reference) |
177 std::pair<iterator, bool> insert(reference value) | 181 std::pair<iterator, bool> insert(reference value) |
178 { return tree_type::insert_unique(value); } | 182 { return tree_type::insert_unique(value); } |
247 | 251 |
248 //! @copydoc ::boost::intrusive::avltree::clear_and_dispose | 252 //! @copydoc ::boost::intrusive::avltree::clear_and_dispose |
249 template<class Disposer> | 253 template<class Disposer> |
250 void clear_and_dispose(Disposer disposer); | 254 void clear_and_dispose(Disposer disposer); |
251 | 255 |
256 #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | |
257 | |
252 //! @copydoc ::boost::intrusive::avltree::count(const_reference)const | 258 //! @copydoc ::boost::intrusive::avltree::count(const_reference)const |
253 size_type count(const_reference value) const; | 259 size_type count(const_reference value) const |
260 { return static_cast<size_type>(this->tree_type::find(value) != this->tree_type::cend()); } | |
254 | 261 |
255 //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyValueCompare)const | 262 //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyValueCompare)const |
256 template<class KeyType, class KeyValueCompare> | 263 template<class KeyType, class KeyValueCompare> |
257 size_type count(const KeyType& key, KeyValueCompare comp) const; | 264 size_type count(const KeyType& key, KeyValueCompare comp) const |
258 | 265 { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); } |
266 | |
267 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | |
268 | |
259 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference) | 269 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference) |
260 iterator lower_bound(const_reference value); | 270 iterator lower_bound(const_reference value); |
261 | 271 |
262 //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyValueCompare) | 272 //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyValueCompare) |
263 template<class KeyType, class KeyValueCompare> | 273 template<class KeyType, class KeyValueCompare> |
264 iterator lower_bound(const KeyType& key, KeyValueCompare comp); | 274 iterator lower_bound(const KeyType& key, KeyValueCompare comp); |
265 | 275 |
266 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference)const | 276 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference)const |
296 | 306 |
297 //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyValueCompare)const | 307 //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyValueCompare)const |
298 template<class KeyType, class KeyValueCompare> | 308 template<class KeyType, class KeyValueCompare> |
299 const_iterator find(const KeyType& key, KeyValueCompare comp) const; | 309 const_iterator find(const KeyType& key, KeyValueCompare comp) const; |
300 | 310 |
301 //! @copydoc ::boost::intrusive::avltree::equal_range(const_reference) | 311 #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
302 std::pair<iterator,iterator> equal_range(const_reference value); | 312 |
303 | 313 //! @copydoc ::boost::intrusive::rbtree::equal_range(const_reference) |
304 //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyValueCompare) | 314 std::pair<iterator,iterator> equal_range(const_reference value) |
305 template<class KeyType, class KeyValueCompare> | 315 { return this->tree_type::lower_bound_range(value); } |
306 std::pair<iterator,iterator> equal_range(const KeyType& key, KeyValueCompare comp); | 316 |
307 | 317 //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyValueCompare) |
308 //! @copydoc ::boost::intrusive::avltree::equal_range(const_reference)const | 318 template<class KeyType, class KeyValueCompare> |
319 std::pair<iterator,iterator> equal_range(const KeyType& key, KeyValueCompare comp) | |
320 { return this->tree_type::lower_bound_range(key, comp); } | |
321 | |
322 //! @copydoc ::boost::intrusive::rbtree::equal_range(const_reference)const | |
309 std::pair<const_iterator, const_iterator> | 323 std::pair<const_iterator, const_iterator> |
310 equal_range(const_reference value) const; | 324 equal_range(const_reference value) const |
311 | 325 { return this->tree_type::lower_bound_range(value); } |
312 //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyValueCompare)const | 326 |
327 //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyValueCompare)const | |
313 template<class KeyType, class KeyValueCompare> | 328 template<class KeyType, class KeyValueCompare> |
314 std::pair<const_iterator, const_iterator> | 329 std::pair<const_iterator, const_iterator> |
315 equal_range(const KeyType& key, KeyValueCompare comp) const; | 330 equal_range(const KeyType& key, KeyValueCompare comp) const |
331 { return this->tree_type::lower_bound_range(key, comp); } | |
332 | |
333 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | |
316 | 334 |
317 //! @copydoc ::boost::intrusive::avltree::bounded_range(const_reference,const_reference,bool,bool) | 335 //! @copydoc ::boost::intrusive::avltree::bounded_range(const_reference,const_reference,bool,bool) |
318 std::pair<iterator,iterator> bounded_range | 336 std::pair<iterator,iterator> bounded_range |
319 (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed); | 337 (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed); |
320 | 338 |
381 //! same options (either explicitly or implicitly) are used. | 399 //! same options (either explicitly or implicitly) are used. |
382 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 400 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
383 template<class T, class ...Options> | 401 template<class T, class ...Options> |
384 #else | 402 #else |
385 template<class T, class O1 = void, class O2 = void | 403 template<class T, class O1 = void, class O2 = void |
386 , class O3 = void, class O4 = void> | 404 , class O3 = void, class O4 = void |
405 , class O5 = void> | |
387 #endif | 406 #endif |
388 struct make_avl_set | 407 struct make_avl_set |
389 { | 408 { |
390 /// @cond | 409 /// @cond |
391 typedef typename pack_options | 410 typedef typename pack_options |
392 < avltree_defaults, | 411 < avltree_defaults, |
393 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 412 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
394 O1, O2, O3, O4 | 413 O1, O2, O3, O4, O5 |
395 #else | 414 #else |
396 Options... | 415 Options... |
397 #endif | 416 #endif |
398 >::type packed_options; | 417 >::type packed_options; |
399 | 418 |
403 typedef avl_set_impl | 422 typedef avl_set_impl |
404 < value_traits | 423 < value_traits |
405 , typename packed_options::compare | 424 , typename packed_options::compare |
406 , typename packed_options::size_type | 425 , typename packed_options::size_type |
407 , packed_options::constant_time_size | 426 , packed_options::constant_time_size |
427 , typename packed_options::header_holder_type | |
408 > implementation_defined; | 428 > implementation_defined; |
409 /// @endcond | 429 /// @endcond |
410 typedef implementation_defined type; | 430 typedef implementation_defined type; |
411 }; | 431 }; |
412 | 432 |
413 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 433 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
414 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 434 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
415 template<class T, class O1, class O2, class O3, class O4> | 435 template<class T, class O1, class O2, class O3, class O4, class O5> |
416 #else | 436 #else |
417 template<class T, class ...Options> | 437 template<class T, class ...Options> |
418 #endif | 438 #endif |
419 class avl_set | 439 class avl_set |
420 : public make_avl_set<T, | 440 : public make_avl_set<T, |
421 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 441 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
422 O1, O2, O3, O4 | 442 O1, O2, O3, O4, O5 |
423 #else | 443 #else |
424 Options... | 444 Options... |
425 #endif | 445 #endif |
426 >::type | 446 >::type |
427 { | 447 { |
428 typedef typename make_avl_set | 448 typedef typename make_avl_set |
429 <T, | 449 <T, |
430 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 450 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
431 O1, O2, O3, O4 | 451 O1, O2, O3, O4, O5 |
432 #else | 452 #else |
433 Options... | 453 Options... |
434 #endif | 454 #endif |
435 >::type Base; | 455 >::type Base; |
436 | 456 |
455 , const value_traits &v_traits = value_traits()) | 475 , const value_traits &v_traits = value_traits()) |
456 : Base(b, e, cmp, v_traits) | 476 : Base(b, e, cmp, v_traits) |
457 {} | 477 {} |
458 | 478 |
459 avl_set(BOOST_RV_REF(avl_set) x) | 479 avl_set(BOOST_RV_REF(avl_set) x) |
460 : Base(::boost::move(static_cast<Base&>(x))) | 480 : Base(BOOST_MOVE_BASE(Base, x)) |
461 {} | 481 {} |
462 | 482 |
463 avl_set& operator=(BOOST_RV_REF(avl_set) x) | 483 avl_set& operator=(BOOST_RV_REF(avl_set) x) |
464 { return static_cast<avl_set &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); } | 484 { return static_cast<avl_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); } |
465 | 485 |
466 static avl_set &container_from_end_iterator(iterator end_iterator) | 486 static avl_set &container_from_end_iterator(iterator end_iterator) |
467 { return static_cast<avl_set &>(Base::container_from_end_iterator(end_iterator)); } | 487 { return static_cast<avl_set &>(Base::container_from_end_iterator(end_iterator)); } |
468 | 488 |
469 static const avl_set &container_from_end_iterator(const_iterator end_iterator) | 489 static const avl_set &container_from_end_iterator(const_iterator end_iterator) |
490 //! \c constant_time_size<>, \c size_type<> and | 510 //! \c constant_time_size<>, \c size_type<> and |
491 //! \c compare<>. | 511 //! \c compare<>. |
492 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) | 512 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) |
493 template<class T, class ...Options> | 513 template<class T, class ...Options> |
494 #else | 514 #else |
495 template<class ValueTraits, class Compare, class SizeType, bool ConstantTimeSize> | 515 template<class ValueTraits, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder> |
496 #endif | 516 #endif |
497 class avl_multiset_impl | 517 class avl_multiset_impl |
498 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 518 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
499 : public bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms> | 519 : public bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> |
500 #endif | 520 #endif |
501 { | 521 { |
502 /// @cond | 522 /// @cond |
503 typedef bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms> tree_type; | 523 typedef bstree_impl<ValueTraits, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type; |
504 | 524 |
505 BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset_impl) | 525 BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset_impl) |
506 typedef tree_type implementation_defined; | 526 typedef tree_type implementation_defined; |
507 /// @endcond | 527 /// @endcond |
508 | 528 |
545 : tree_type(false, b, e, cmp, v_traits) | 565 : tree_type(false, b, e, cmp, v_traits) |
546 {} | 566 {} |
547 | 567 |
548 //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&) | 568 //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&) |
549 avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x) | 569 avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x) |
550 : tree_type(::boost::move(static_cast<tree_type&>(x))) | 570 : tree_type(BOOST_MOVE_BASE(tree_type, x)) |
551 {} | 571 {} |
552 | 572 |
553 //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&) | 573 //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&) |
554 avl_multiset_impl& operator=(BOOST_RV_REF(avl_multiset_impl) x) | 574 avl_multiset_impl& operator=(BOOST_RV_REF(avl_multiset_impl) x) |
555 { return static_cast<avl_multiset_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); } | 575 { return static_cast<avl_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); } |
556 | 576 |
557 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 577 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
558 //! @copydoc ::boost::intrusive::avltree::~avltree() | 578 //! @copydoc ::boost::intrusive::avltree::~avltree() |
559 ~avl_multiset_impl(); | 579 ~avl_multiset_impl(); |
560 | 580 |
622 void swap(avl_multiset_impl& other); | 642 void swap(avl_multiset_impl& other); |
623 | 643 |
624 //! @copydoc ::boost::intrusive::avltree::clone_from | 644 //! @copydoc ::boost::intrusive::avltree::clone_from |
625 template <class Cloner, class Disposer> | 645 template <class Cloner, class Disposer> |
626 void clone_from(const avl_multiset_impl &src, Cloner cloner, Disposer disposer); | 646 void clone_from(const avl_multiset_impl &src, Cloner cloner, Disposer disposer); |
627 | 647 |
628 #endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED | 648 #endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED |
629 | 649 |
630 //! @copydoc ::boost::intrusive::avltree::insert_equal(reference) | 650 //! @copydoc ::boost::intrusive::avltree::insert_equal(reference) |
631 iterator insert(reference value) | 651 iterator insert(reference value) |
632 { return tree_type::insert_equal(value); } | 652 { return tree_type::insert_equal(value); } |
690 size_type count(const_reference value) const; | 710 size_type count(const_reference value) const; |
691 | 711 |
692 //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyValueCompare)const | 712 //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyValueCompare)const |
693 template<class KeyType, class KeyValueCompare> | 713 template<class KeyType, class KeyValueCompare> |
694 size_type count(const KeyType& key, KeyValueCompare comp) const; | 714 size_type count(const KeyType& key, KeyValueCompare comp) const; |
695 | 715 |
696 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference) | 716 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference) |
697 iterator lower_bound(const_reference value); | 717 iterator lower_bound(const_reference value); |
698 | 718 |
699 //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyValueCompare) | 719 //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyValueCompare) |
700 template<class KeyType, class KeyValueCompare> | 720 template<class KeyType, class KeyValueCompare> |
701 iterator lower_bound(const KeyType& key, KeyValueCompare comp); | 721 iterator lower_bound(const KeyType& key, KeyValueCompare comp); |
702 | 722 |
703 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference)const | 723 //! @copydoc ::boost::intrusive::avltree::lower_bound(const_reference)const |
818 //! same options (either explicitly or implicitly) are used. | 838 //! same options (either explicitly or implicitly) are used. |
819 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 839 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
820 template<class T, class ...Options> | 840 template<class T, class ...Options> |
821 #else | 841 #else |
822 template<class T, class O1 = void, class O2 = void | 842 template<class T, class O1 = void, class O2 = void |
823 , class O3 = void, class O4 = void> | 843 , class O3 = void, class O4 = void |
844 , class O5 = void> | |
824 #endif | 845 #endif |
825 struct make_avl_multiset | 846 struct make_avl_multiset |
826 { | 847 { |
827 /// @cond | 848 /// @cond |
828 typedef typename pack_options | 849 typedef typename pack_options |
829 < avltree_defaults, | 850 < avltree_defaults, |
830 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 851 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
831 O1, O2, O3, O4 | 852 O1, O2, O3, O4, O5 |
832 #else | 853 #else |
833 Options... | 854 Options... |
834 #endif | 855 #endif |
835 >::type packed_options; | 856 >::type packed_options; |
836 | 857 |
840 typedef avl_multiset_impl | 861 typedef avl_multiset_impl |
841 < value_traits | 862 < value_traits |
842 , typename packed_options::compare | 863 , typename packed_options::compare |
843 , typename packed_options::size_type | 864 , typename packed_options::size_type |
844 , packed_options::constant_time_size | 865 , packed_options::constant_time_size |
866 , typename packed_options::header_holder_type | |
845 > implementation_defined; | 867 > implementation_defined; |
846 /// @endcond | 868 /// @endcond |
847 typedef implementation_defined type; | 869 typedef implementation_defined type; |
848 }; | 870 }; |
849 | 871 |
850 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 872 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
851 | 873 |
852 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 874 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
853 template<class T, class O1, class O2, class O3, class O4> | 875 template<class T, class O1, class O2, class O3, class O4, class O5> |
854 #else | 876 #else |
855 template<class T, class ...Options> | 877 template<class T, class ...Options> |
856 #endif | 878 #endif |
857 class avl_multiset | 879 class avl_multiset |
858 : public make_avl_multiset<T, | 880 : public make_avl_multiset<T, |
859 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 881 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
860 O1, O2, O3, O4 | 882 O1, O2, O3, O4, O5 |
861 #else | 883 #else |
862 Options... | 884 Options... |
863 #endif | 885 #endif |
864 >::type | 886 >::type |
865 { | 887 { |
866 typedef typename make_avl_multiset<T, | 888 typedef typename make_avl_multiset<T, |
867 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 889 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
868 O1, O2, O3, O4 | 890 O1, O2, O3, O4, O5 |
869 #else | 891 #else |
870 Options... | 892 Options... |
871 #endif | 893 #endif |
872 >::type Base; | 894 >::type Base; |
873 | 895 |
893 , const value_traits &v_traits = value_traits()) | 915 , const value_traits &v_traits = value_traits()) |
894 : Base(b, e, cmp, v_traits) | 916 : Base(b, e, cmp, v_traits) |
895 {} | 917 {} |
896 | 918 |
897 avl_multiset(BOOST_RV_REF(avl_multiset) x) | 919 avl_multiset(BOOST_RV_REF(avl_multiset) x) |
898 : Base(::boost::move(static_cast<Base&>(x))) | 920 : Base(BOOST_MOVE_BASE(Base, x)) |
899 {} | 921 {} |
900 | 922 |
901 avl_multiset& operator=(BOOST_RV_REF(avl_multiset) x) | 923 avl_multiset& operator=(BOOST_RV_REF(avl_multiset) x) |
902 { return static_cast<avl_multiset &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); } | 924 { return static_cast<avl_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); } |
903 | 925 |
904 static avl_multiset &container_from_end_iterator(iterator end_iterator) | 926 static avl_multiset &container_from_end_iterator(iterator end_iterator) |
905 { return static_cast<avl_multiset &>(Base::container_from_end_iterator(end_iterator)); } | 927 { return static_cast<avl_multiset &>(Base::container_from_end_iterator(end_iterator)); } |
906 | 928 |
907 static const avl_multiset &container_from_end_iterator(const_iterator end_iterator) | 929 static const avl_multiset &container_from_end_iterator(const_iterator end_iterator) |