Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/intrusive/treap_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 // |
9 // See http://www.boost.org/libs/intrusive for documentation. | 9 // See http://www.boost.org/libs/intrusive for documentation. |
10 // | 10 // |
11 ///////////////////////////////////////////////////////////////////////////// | 11 ///////////////////////////////////////////////////////////////////////////// |
12 #ifndef BOOST_INTRUSIVE_TRIE_SET_HPP | 12 #ifndef BOOST_INTRUSIVE_TREAP_SET_HPP |
13 #define BOOST_INTRUSIVE_TRIE_SET_HPP | 13 #define BOOST_INTRUSIVE_TREAP_SET_HPP |
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/treap.hpp> | 17 #include <boost/intrusive/treap.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 treap_set is an intrusive container, that mimics most of | 29 //! The class template treap_set is an intrusive container, that mimics most of |
34 //! \c constant_time_size<>, \c size_type<>, | 38 //! \c constant_time_size<>, \c size_type<>, |
35 //! \c compare<> and \c priority_compare<> | 39 //! \c compare<> and \c priority_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 VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize> | 43 template<class ValueTraits, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder> |
40 #endif | 44 #endif |
41 class treap_set_impl | 45 class treap_set_impl |
42 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 46 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
43 : public treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize> | 47 : public treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> |
44 #endif | 48 #endif |
45 { | 49 { |
46 /// @cond | 50 /// @cond |
47 typedef treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize> tree_type; | 51 public: |
52 typedef treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type; | |
48 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set_impl) | 53 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set_impl) |
49 | 54 |
50 typedef tree_type implementation_defined; | 55 typedef tree_type implementation_defined; |
51 /// @endcond | 56 /// @endcond |
52 | 57 |
94 //! | 99 //! |
95 //! <b>Effects</b>: Constructs an empty treap_set and inserts elements from | 100 //! <b>Effects</b>: Constructs an empty treap_set and inserts elements from |
96 //! [b, e). | 101 //! [b, e). |
97 //! | 102 //! |
98 //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using | 103 //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using |
99 //! comp and otherwise N * log N, where N is std::distance(last, first). | 104 //! comp and otherwise N * log N, where N is distance(last, first). |
100 //! | 105 //! |
101 //! <b>Throws</b>: If value_traits::node_traits::node | 106 //! <b>Throws</b>: If value_traits::node_traits::node |
102 //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) | 107 //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) |
103 //! or the copy constructor/operator() of the value_compare object throws. | 108 //! or the copy constructor/operator() of the value_compare object throws. |
104 template<class Iterator> | 109 template<class Iterator> |
110 {} | 115 {} |
111 | 116 |
112 //! <b>Effects</b>: to-do | 117 //! <b>Effects</b>: to-do |
113 //! | 118 //! |
114 treap_set_impl(BOOST_RV_REF(treap_set_impl) x) | 119 treap_set_impl(BOOST_RV_REF(treap_set_impl) x) |
115 : tree_type(::boost::move(static_cast<tree_type&>(x))) | 120 : tree_type(BOOST_MOVE_BASE(tree_type, x)) |
116 {} | 121 {} |
117 | 122 |
118 //! <b>Effects</b>: to-do | 123 //! <b>Effects</b>: to-do |
119 //! | 124 //! |
120 treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x) | 125 treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x) |
121 { return static_cast<treap_set_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); } | 126 { return static_cast<treap_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); } |
122 | 127 |
123 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 128 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
124 //! @copydoc ::boost::intrusive::treap::~treap() | 129 //! @copydoc ::boost::intrusive::treap::~treap() |
125 ~treap_set_impl(); | 130 ~treap_set_impl(); |
126 | 131 |
289 | 294 |
290 //! @copydoc ::boost::intrusive::treap::clear_and_dispose | 295 //! @copydoc ::boost::intrusive::treap::clear_and_dispose |
291 template<class Disposer> | 296 template<class Disposer> |
292 void clear_and_dispose(Disposer disposer); | 297 void clear_and_dispose(Disposer disposer); |
293 | 298 |
299 #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | |
300 | |
294 //! @copydoc ::boost::intrusive::treap::count(const_reference)const | 301 //! @copydoc ::boost::intrusive::treap::count(const_reference)const |
295 size_type count(const_reference value) const; | 302 size_type count(const_reference value) const |
303 { return static_cast<size_type>(this->tree_type::find(value) != this->tree_type::cend()); } | |
296 | 304 |
297 //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyValueCompare)const | 305 //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyValueCompare)const |
298 template<class KeyType, class KeyValueCompare> | 306 template<class KeyType, class KeyValueCompare> |
299 size_type count(const KeyType& key, KeyValueCompare comp) const; | 307 size_type count(const KeyType& key, KeyValueCompare comp) const |
300 | 308 { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); } |
309 | |
310 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | |
311 | |
301 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference) | 312 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference) |
302 iterator lower_bound(const_reference value); | 313 iterator lower_bound(const_reference value); |
303 | 314 |
304 //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare) | 315 //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare) |
305 template<class KeyType, class KeyValueCompare> | 316 template<class KeyType, class KeyValueCompare> |
306 iterator lower_bound(const KeyType& key, KeyValueCompare comp); | 317 iterator lower_bound(const KeyType& key, KeyValueCompare comp); |
307 | 318 |
308 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)const | 319 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)const |
338 | 349 |
339 //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyValueCompare)const | 350 //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyValueCompare)const |
340 template<class KeyType, class KeyValueCompare> | 351 template<class KeyType, class KeyValueCompare> |
341 const_iterator find(const KeyType& key, KeyValueCompare comp) const; | 352 const_iterator find(const KeyType& key, KeyValueCompare comp) const; |
342 | 353 |
343 //! @copydoc ::boost::intrusive::treap::equal_range(const_reference) | 354 #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
344 std::pair<iterator,iterator> equal_range(const_reference value); | 355 |
345 | 356 //! @copydoc ::boost::intrusive::rbtree::equal_range(const_reference) |
346 //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyValueCompare) | 357 std::pair<iterator,iterator> equal_range(const_reference value) |
347 template<class KeyType, class KeyValueCompare> | 358 { return this->tree_type::lower_bound_range(value); } |
348 std::pair<iterator,iterator> equal_range(const KeyType& key, KeyValueCompare comp); | 359 |
349 | 360 //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyValueCompare) |
350 //! @copydoc ::boost::intrusive::treap::equal_range(const_reference)const | 361 template<class KeyType, class KeyValueCompare> |
362 std::pair<iterator,iterator> equal_range(const KeyType& key, KeyValueCompare comp) | |
363 { return this->tree_type::lower_bound_range(key, comp); } | |
364 | |
365 //! @copydoc ::boost::intrusive::rbtree::equal_range(const_reference)const | |
351 std::pair<const_iterator, const_iterator> | 366 std::pair<const_iterator, const_iterator> |
352 equal_range(const_reference value) const; | 367 equal_range(const_reference value) const |
353 | 368 { return this->tree_type::lower_bound_range(value); } |
354 //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyValueCompare)const | 369 |
370 //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyValueCompare)const | |
355 template<class KeyType, class KeyValueCompare> | 371 template<class KeyType, class KeyValueCompare> |
356 std::pair<const_iterator, const_iterator> | 372 std::pair<const_iterator, const_iterator> |
357 equal_range(const KeyType& key, KeyValueCompare comp) const; | 373 equal_range(const KeyType& key, KeyValueCompare comp) const |
374 { return this->tree_type::lower_bound_range(key, comp); } | |
375 | |
376 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | |
358 | 377 |
359 //! @copydoc ::boost::intrusive::treap::bounded_range(const_reference,const_reference,bool,bool) | 378 //! @copydoc ::boost::intrusive::treap::bounded_range(const_reference,const_reference,bool,bool) |
360 std::pair<iterator,iterator> bounded_range | 379 std::pair<iterator,iterator> bounded_range |
361 (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed); | 380 (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed); |
362 | 381 |
406 //! same options (either explicitly or implicitly) are used. | 425 //! same options (either explicitly or implicitly) are used. |
407 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 426 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
408 template<class T, class ...Options> | 427 template<class T, class ...Options> |
409 #else | 428 #else |
410 template<class T, class O1 = void, class O2 = void | 429 template<class T, class O1 = void, class O2 = void |
411 , class O3 = void, class O4 = void> | 430 , class O3 = void, class O4 = void |
431 , class O5 = void> | |
412 #endif | 432 #endif |
413 struct make_treap_set | 433 struct make_treap_set |
414 { | 434 { |
415 typedef typename pack_options | 435 typedef typename pack_options |
416 < treap_defaults, | 436 < treap_defaults, |
417 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 437 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
418 O1, O2, O3, O4 | 438 O1, O2, O3, O4, O5 |
419 #else | 439 #else |
420 Options... | 440 Options... |
421 #endif | 441 #endif |
422 >::type packed_options; | 442 >::type packed_options; |
423 | 443 |
428 < value_traits | 448 < value_traits |
429 , typename packed_options::compare | 449 , typename packed_options::compare |
430 , typename packed_options::priority | 450 , typename packed_options::priority |
431 , typename packed_options::size_type | 451 , typename packed_options::size_type |
432 , packed_options::constant_time_size | 452 , packed_options::constant_time_size |
453 , typename packed_options::header_holder_type | |
433 > implementation_defined; | 454 > implementation_defined; |
434 /// @endcond | 455 /// @endcond |
435 typedef implementation_defined type; | 456 typedef implementation_defined type; |
436 }; | 457 }; |
437 | 458 |
438 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 459 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
439 | 460 |
440 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 461 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
441 template<class T, class O1, class O2, class O3, class O4> | 462 template<class T, class O1, class O2, class O3, class O4, class O5> |
442 #else | 463 #else |
443 template<class T, class ...Options> | 464 template<class T, class ...Options> |
444 #endif | 465 #endif |
445 class treap_set | 466 class treap_set |
446 : public make_treap_set<T, | 467 : public make_treap_set<T, |
447 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 468 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
448 O1, O2, O3, O4 | 469 O1, O2, O3, O4, O5 |
449 #else | 470 #else |
450 Options... | 471 Options... |
451 #endif | 472 #endif |
452 >::type | 473 >::type |
453 { | 474 { |
454 typedef typename make_treap_set | 475 typedef typename make_treap_set |
455 <T, | 476 <T, |
456 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 477 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
457 O1, O2, O3, O4 | 478 O1, O2, O3, O4, O5 |
458 #else | 479 #else |
459 Options... | 480 Options... |
460 #endif | 481 #endif |
461 >::type Base; | 482 >::type Base; |
462 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set) | 483 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set) |
484 , const value_traits &v_traits = value_traits()) | 505 , const value_traits &v_traits = value_traits()) |
485 : Base(b, e, cmp, pcmp, v_traits) | 506 : Base(b, e, cmp, pcmp, v_traits) |
486 {} | 507 {} |
487 | 508 |
488 treap_set(BOOST_RV_REF(treap_set) x) | 509 treap_set(BOOST_RV_REF(treap_set) x) |
489 : Base(::boost::move(static_cast<Base&>(x))) | 510 : Base(BOOST_MOVE_BASE(Base, x)) |
490 {} | 511 {} |
491 | 512 |
492 treap_set& operator=(BOOST_RV_REF(treap_set) x) | 513 treap_set& operator=(BOOST_RV_REF(treap_set) x) |
493 { return static_cast<treap_set &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); } | 514 { return static_cast<treap_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); } |
494 | 515 |
495 static treap_set &container_from_end_iterator(iterator end_iterator) | 516 static treap_set &container_from_end_iterator(iterator end_iterator) |
496 { return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); } | 517 { return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); } |
497 | 518 |
498 static const treap_set &container_from_end_iterator(const_iterator end_iterator) | 519 static const treap_set &container_from_end_iterator(const_iterator end_iterator) |
519 //! \c constant_time_size<>, \c size_type<>, | 540 //! \c constant_time_size<>, \c size_type<>, |
520 //! \c compare<> and \c priority_compare<> | 541 //! \c compare<> and \c priority_compare<> |
521 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) | 542 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) |
522 template<class T, class ...Options> | 543 template<class T, class ...Options> |
523 #else | 544 #else |
524 template<class ValueTraits, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize> | 545 template<class ValueTraits, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder> |
525 #endif | 546 #endif |
526 class treap_multiset_impl | 547 class treap_multiset_impl |
527 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 548 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
528 : public treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize> | 549 : public treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> |
529 #endif | 550 #endif |
530 { | 551 { |
531 /// @cond | 552 /// @cond |
532 typedef treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize> tree_type; | 553 typedef treap_impl<ValueTraits, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type; |
533 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset_impl) | 554 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset_impl) |
534 | 555 |
535 typedef tree_type implementation_defined; | 556 typedef tree_type implementation_defined; |
536 /// @endcond | 557 /// @endcond |
537 | 558 |
579 //! | 600 //! |
580 //! <b>Effects</b>: Constructs an empty treap_multiset and inserts elements from | 601 //! <b>Effects</b>: Constructs an empty treap_multiset and inserts elements from |
581 //! [b, e). | 602 //! [b, e). |
582 //! | 603 //! |
583 //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using | 604 //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using |
584 //! comp and otherwise N * log N, where N is std::distance(last, first). | 605 //! comp and otherwise N * log N, where N is distance(last, first). |
585 //! | 606 //! |
586 //! <b>Throws</b>: If value_traits::node_traits::node | 607 //! <b>Throws</b>: If value_traits::node_traits::node |
587 //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) | 608 //! constructor throws (this does not happen with predefined Boost.Intrusive hooks) |
588 //! or the copy constructor/operator() of the value_compare object throws. | 609 //! or the copy constructor/operator() of the value_compare object throws. |
589 template<class Iterator> | 610 template<class Iterator> |
595 {} | 616 {} |
596 | 617 |
597 //! <b>Effects</b>: to-do | 618 //! <b>Effects</b>: to-do |
598 //! | 619 //! |
599 treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x) | 620 treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x) |
600 : tree_type(::boost::move(static_cast<tree_type&>(x))) | 621 : tree_type(BOOST_MOVE_BASE(tree_type, x)) |
601 {} | 622 {} |
602 | 623 |
603 //! <b>Effects</b>: to-do | 624 //! <b>Effects</b>: to-do |
604 //! | 625 //! |
605 treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x) | 626 treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x) |
606 { return static_cast<treap_multiset_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); } | 627 { return static_cast<treap_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); } |
607 | 628 |
608 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 629 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
609 //! @copydoc ::boost::intrusive::treap::~treap() | 630 //! @copydoc ::boost::intrusive::treap::~treap() |
610 ~treap_multiset_impl(); | 631 ~treap_multiset_impl(); |
611 | 632 |
761 size_type count(const_reference value) const; | 782 size_type count(const_reference value) const; |
762 | 783 |
763 //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyValueCompare)const | 784 //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyValueCompare)const |
764 template<class KeyType, class KeyValueCompare> | 785 template<class KeyType, class KeyValueCompare> |
765 size_type count(const KeyType& key, KeyValueCompare comp) const; | 786 size_type count(const KeyType& key, KeyValueCompare comp) const; |
766 | 787 |
767 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference) | 788 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference) |
768 iterator lower_bound(const_reference value); | 789 iterator lower_bound(const_reference value); |
769 | 790 |
770 //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare) | 791 //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare) |
771 template<class KeyType, class KeyValueCompare> | 792 template<class KeyType, class KeyValueCompare> |
772 iterator lower_bound(const KeyType& key, KeyValueCompare comp); | 793 iterator lower_bound(const KeyType& key, KeyValueCompare comp); |
773 | 794 |
774 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)const | 795 //! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)const |
872 //! same options (either explicitly or implicitly) are used. | 893 //! same options (either explicitly or implicitly) are used. |
873 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 894 #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
874 template<class T, class ...Options> | 895 template<class T, class ...Options> |
875 #else | 896 #else |
876 template<class T, class O1 = void, class O2 = void | 897 template<class T, class O1 = void, class O2 = void |
877 , class O3 = void, class O4 = void> | 898 , class O3 = void, class O4 = void |
899 , class O5 = void> | |
878 #endif | 900 #endif |
879 struct make_treap_multiset | 901 struct make_treap_multiset |
880 { | 902 { |
881 typedef typename pack_options | 903 typedef typename pack_options |
882 < treap_defaults, | 904 < treap_defaults, |
883 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 905 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
884 O1, O2, O3, O4 | 906 O1, O2, O3, O4, O5 |
885 #else | 907 #else |
886 Options... | 908 Options... |
887 #endif | 909 #endif |
888 >::type packed_options; | 910 >::type packed_options; |
889 | 911 |
894 < value_traits | 916 < value_traits |
895 , typename packed_options::compare | 917 , typename packed_options::compare |
896 , typename packed_options::priority | 918 , typename packed_options::priority |
897 , typename packed_options::size_type | 919 , typename packed_options::size_type |
898 , packed_options::constant_time_size | 920 , packed_options::constant_time_size |
921 , typename packed_options::header_holder_type | |
899 > implementation_defined; | 922 > implementation_defined; |
900 /// @endcond | 923 /// @endcond |
901 typedef implementation_defined type; | 924 typedef implementation_defined type; |
902 }; | 925 }; |
903 | 926 |
904 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED | 927 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED |
905 | 928 |
906 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 929 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
907 template<class T, class O1, class O2, class O3, class O4> | 930 template<class T, class O1, class O2, class O3, class O4, class O5> |
908 #else | 931 #else |
909 template<class T, class ...Options> | 932 template<class T, class ...Options> |
910 #endif | 933 #endif |
911 class treap_multiset | 934 class treap_multiset |
912 : public make_treap_multiset<T, | 935 : public make_treap_multiset<T, |
913 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 936 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
914 O1, O2, O3, O4 | 937 O1, O2, O3, O4, O5 |
915 #else | 938 #else |
916 Options... | 939 Options... |
917 #endif | 940 #endif |
918 >::type | 941 >::type |
919 { | 942 { |
920 typedef typename make_treap_multiset | 943 typedef typename make_treap_multiset |
921 <T, | 944 <T, |
922 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) | 945 #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) |
923 O1, O2, O3, O4 | 946 O1, O2, O3, O4, O5 |
924 #else | 947 #else |
925 Options... | 948 Options... |
926 #endif | 949 #endif |
927 >::type Base; | 950 >::type Base; |
928 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset) | 951 BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset) |
950 , const value_traits &v_traits = value_traits()) | 973 , const value_traits &v_traits = value_traits()) |
951 : Base(b, e, cmp, pcmp, v_traits) | 974 : Base(b, e, cmp, pcmp, v_traits) |
952 {} | 975 {} |
953 | 976 |
954 treap_multiset(BOOST_RV_REF(treap_multiset) x) | 977 treap_multiset(BOOST_RV_REF(treap_multiset) x) |
955 : Base(::boost::move(static_cast<Base&>(x))) | 978 : Base(BOOST_MOVE_BASE(Base, x)) |
956 {} | 979 {} |
957 | 980 |
958 treap_multiset& operator=(BOOST_RV_REF(treap_multiset) x) | 981 treap_multiset& operator=(BOOST_RV_REF(treap_multiset) x) |
959 { return static_cast<treap_multiset &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); } | 982 { return static_cast<treap_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); } |
960 | 983 |
961 static treap_multiset &container_from_end_iterator(iterator end_iterator) | 984 static treap_multiset &container_from_end_iterator(iterator end_iterator) |
962 { return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); } | 985 { return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); } |
963 | 986 |
964 static const treap_multiset &container_from_end_iterator(const_iterator end_iterator) | 987 static const treap_multiset &container_from_end_iterator(const_iterator end_iterator) |
976 } //namespace intrusive | 999 } //namespace intrusive |
977 } //namespace boost | 1000 } //namespace boost |
978 | 1001 |
979 #include <boost/intrusive/detail/config_end.hpp> | 1002 #include <boost/intrusive/detail/config_end.hpp> |
980 | 1003 |
981 #endif //BOOST_INTRUSIVE_TRIE_SET_HPP | 1004 #endif //BOOST_INTRUSIVE_TREAP_SET_HPP |