RPNX::DataStructures
Header-only C++ data structures and supporting utilities.
Loading...
Searching...
No Matches
map.hpp
1// Copyright (c) 2026 Ryan P. Nicholl <rnicholl@protonmail.com>
2
3#ifndef RPNXDATASTRUCTURES_MAP_HPP
4#define RPNXDATASTRUCTURES_MAP_HPP
5
6#include <compare>
7#include <initializer_list>
8#include <map>
9#include <memory>
10#include <type_traits>
11#include <utility>
12
13namespace rpnx
14{
29 template < typename Key, typename T, typename Compare = std::less< Key >, typename Allocator = std::allocator< std::pair< Key const, T > > >
30 class map
31 {
32 public:
34 using underlying_type = std::map< Key, T, Compare, Allocator >;
36 using key_type = typename underlying_type::key_type;
38 using mapped_type = typename underlying_type::mapped_type;
40 using value_type = typename underlying_type::value_type;
42 using size_type = typename underlying_type::size_type;
44 using difference_type = typename underlying_type::difference_type;
46 using key_compare = typename underlying_type::key_compare;
48 using value_compare = typename underlying_type::value_compare;
50 using allocator_type = typename underlying_type::allocator_type;
52 using reference = typename underlying_type::reference;
54 using const_reference = typename underlying_type::const_reference;
56 using pointer = typename underlying_type::pointer;
58 using const_pointer = typename underlying_type::const_pointer;
60 using iterator = typename underlying_type::iterator;
62 using const_iterator = typename underlying_type::const_iterator;
64 using reverse_iterator = typename underlying_type::reverse_iterator;
66 using const_reverse_iterator = typename underlying_type::const_reverse_iterator;
68 using node_type = typename underlying_type::node_type;
70 using insert_return_type = typename underlying_type::insert_return_type;
71
72 private:
73 underlying_type m_map;
74
75 public:
79 map() = default;
80
86 explicit map(Compare const& comp, Allocator const& alloc = Allocator()) : m_map(comp, alloc)
87 {
88 }
89
94 explicit map(Allocator const& alloc) : m_map(alloc)
95 {
96 }
97
106 template < typename InputIt >
107 map(InputIt first, InputIt last, Compare const& comp = Compare(), Allocator const& alloc = Allocator()) : m_map(first, last, comp, alloc)
108 {
109 }
110
118 template < typename InputIt >
119 map(InputIt first, InputIt last, Allocator const& alloc) : m_map(first, last, alloc)
120 {
121 }
122
129 map(std::initializer_list< value_type > init, Compare const& comp = Compare(), Allocator const& alloc = Allocator()) : m_map(init, comp, alloc)
130 {
131 }
132
138 map(std::initializer_list< value_type > init, Allocator const& alloc) : m_map(init, alloc)
139 {
140 }
141
145 map(map const&) = default;
146
150 map(map&&) noexcept(std::is_nothrow_move_constructible_v< underlying_type >) = default;
151
157 map(map const& other, Allocator const& alloc) : m_map(other.m_map, alloc)
158 {
159 }
160
166 map(map&& other, Allocator const& alloc) : m_map(std::move(other.m_map), alloc)
167 {
168 }
169
174 map& operator=(map const&) = default;
175
180 map& operator=(map&&) noexcept(std::is_nothrow_move_assignable_v< underlying_type >) = default;
181
187 map& operator=(std::initializer_list< value_type > init)
188 {
189 m_map = init;
190 return *this;
191 }
192
198 {
199 return m_map.get_allocator();
200 }
201
208 T& at(Key const& key)
209 {
210 return m_map.at(key);
211 }
212
214 T const& at(Key const& key) const
215 {
216 return m_map.at(key);
217 }
218
224 T& operator[](Key const& key)
225 {
226 return m_map[key];
227 }
228
234 T& operator[](Key&& key)
235 {
236 return m_map[std::move(key)];
237 }
238
240 iterator begin() noexcept
241 {
242 return m_map.begin();
243 }
244
246 const_iterator begin() const noexcept
247 {
248 return m_map.begin();
249 }
250
252 const_iterator cbegin() const noexcept
253 {
254 return m_map.cbegin();
255 }
256
258 iterator end() noexcept
259 {
260 return m_map.end();
261 }
262
264 const_iterator end() const noexcept
265 {
266 return m_map.end();
267 }
268
270 const_iterator cend() const noexcept
271 {
272 return m_map.cend();
273 }
274
277 {
278 return m_map.rbegin();
279 }
280
283 {
284 return m_map.rbegin();
285 }
286
289 {
290 return m_map.crbegin();
291 }
292
295 {
296 return m_map.rend();
297 }
298
301 {
302 return m_map.rend();
303 }
304
307 {
308 return m_map.crend();
309 }
310
312 bool empty() const noexcept
313 {
314 return m_map.empty();
315 }
316
318 size_type size() const noexcept
319 {
320 return m_map.size();
321 }
322
324 size_type max_size() const noexcept
325 {
326 return m_map.max_size();
327 }
328
330 void clear() noexcept
331 {
332 m_map.clear();
333 }
334
340 std::pair< iterator, bool > insert(value_type const& value)
341 {
342 return m_map.insert(value);
343 }
344
350 std::pair< iterator, bool > insert(value_type&& value)
351 {
352 return m_map.insert(std::move(value));
353 }
354
361 template < typename P >
362 requires std::is_constructible_v< value_type, P&& >
363 std::pair< iterator, bool > insert(P&& value)
364 {
365 return m_map.insert(std::forward< P >(value));
366 }
367
375 {
376 return m_map.insert(hint, value);
377 }
378
386 {
387 return m_map.insert(hint, std::move(value));
388 }
389
397 template < typename P >
398 requires std::is_constructible_v< value_type, P&& >
400 {
401 return m_map.insert(hint, std::forward< P >(value));
402 }
403
410 template < typename InputIt >
411 void insert(InputIt first, InputIt last)
412 {
413 m_map.insert(first, last);
414 }
415
417 void insert(std::initializer_list< value_type > init)
418 {
419 m_map.insert(init);
420 }
421
428 {
429 return m_map.insert(std::move(node));
430 }
431
439 {
440 return m_map.insert(hint, std::move(node));
441 }
442
449 template < typename... Args >
450 std::pair< iterator, bool > emplace(Args&&... args)
451 {
452 return m_map.emplace(std::forward< Args >(args)...);
453 }
454
462 template < typename... Args >
464 {
465 return m_map.emplace_hint(hint, std::forward< Args >(args)...);
466 }
467
475 template < typename... Args >
476 std::pair< iterator, bool > try_emplace(Key const& key, Args&&... args)
477 {
478 return m_map.try_emplace(key, std::forward< Args >(args)...);
479 }
480
488 template < typename... Args >
489 std::pair< iterator, bool > try_emplace(Key&& key, Args&&... args)
490 {
491 return m_map.try_emplace(std::move(key), std::forward< Args >(args)...);
492 }
493
502 template < typename... Args >
503 iterator try_emplace(const_iterator hint, Key const& key, Args&&... args)
504 {
505 return m_map.try_emplace(hint, key, std::forward< Args >(args)...);
506 }
507
516 template < typename... Args >
517 iterator try_emplace(const_iterator hint, Key&& key, Args&&... args)
518 {
519 return m_map.try_emplace(hint, std::move(key), std::forward< Args >(args)...);
520 }
521
529 template < typename M >
530 std::pair< iterator, bool > insert_or_assign(Key const& key, M&& obj)
531 {
532 return m_map.insert_or_assign(key, std::forward< M >(obj));
533 }
534
542 template < typename M >
543 std::pair< iterator, bool > insert_or_assign(Key&& key, M&& obj)
544 {
545 return m_map.insert_or_assign(std::move(key), std::forward< M >(obj));
546 }
547
556 template < typename M >
557 iterator insert_or_assign(const_iterator hint, Key const& key, M&& obj)
558 {
559 return m_map.insert_or_assign(hint, key, std::forward< M >(obj));
560 }
561
570 template < typename M >
571 iterator insert_or_assign(const_iterator hint, Key&& key, M&& obj)
572 {
573 return m_map.insert_or_assign(hint, std::move(key), std::forward< M >(obj));
574 }
575
578 {
579 return m_map.erase(pos);
580 }
581
584 {
585 return m_map.erase(first, last);
586 }
587
589 size_type erase(Key const& key)
590 {
591 return m_map.erase(key);
592 }
593
595 void swap(map& other) noexcept(noexcept(m_map.swap(other.m_map)))
596 {
597 m_map.swap(other.m_map);
598 }
599
602 {
603 return m_map.extract(pos);
604 }
605
607 node_type extract(Key const& key)
608 {
609 return m_map.extract(key);
610 }
611
613 template < typename C2 >
614 void merge(map< Key, T, C2, Allocator >& source)
615 {
616 m_map.merge(source.m_map);
617 }
618
620 template < typename C2 >
621 void merge(map< Key, T, C2, Allocator >&& source)
622 {
623 m_map.merge(source.m_map);
624 }
625
627 template < typename C2 >
628 void merge(std::map< Key, T, C2, Allocator >& source)
629 {
630 m_map.merge(source);
631 }
632
634 template < typename C2 >
635 void merge(std::map< Key, T, C2, Allocator >&& source)
636 {
637 m_map.merge(source);
638 }
639
641 size_type count(Key const& key) const
642 {
643 return m_map.count(key);
644 }
645
647 iterator find(Key const& key)
648 {
649 return m_map.find(key);
650 }
651
653 const_iterator find(Key const& key) const
654 {
655 return m_map.find(key);
656 }
657
659 bool contains(Key const& key) const
660 {
661 return m_map.contains(key);
662 }
663
665 std::pair< iterator, iterator > equal_range(Key const& key)
666 {
667 return m_map.equal_range(key);
668 }
669
671 std::pair< const_iterator, const_iterator > equal_range(Key const& key) const
672 {
673 return m_map.equal_range(key);
674 }
675
677 iterator lower_bound(Key const& key)
678 {
679 return m_map.lower_bound(key);
680 }
681
683 const_iterator lower_bound(Key const& key) const
684 {
685 return m_map.lower_bound(key);
686 }
687
689 iterator upper_bound(Key const& key)
690 {
691 return m_map.upper_bound(key);
692 }
693
695 const_iterator upper_bound(Key const& key) const
696 {
697 return m_map.upper_bound(key);
698 }
699
702 {
703 return m_map.key_comp();
704 }
705
708 {
709 return m_map.value_comp();
710 }
711
712 template < typename K, typename U, typename C, typename A >
713 friend class map;
714
716 template < typename K, typename U, typename C, typename A >
717 friend bool operator==(map< K, U, C, A > const& lhs, map< K, U, C, A > const& rhs);
718
720 template < typename K, typename U, typename C, typename A >
721 friend bool operator<(map< K, U, C, A > const& lhs, map< K, U, C, A > const& rhs);
722
724 template < typename K, typename U, typename C, typename A >
725 friend auto operator<=>(map< K, U, C, A > const& lhs, map< K, U, C, A > const& rhs) -> decltype(std::declval< typename map< K, U, C, A >::underlying_type const& >() <=> std::declval< typename map< K, U, C, A >::underlying_type const& >());
726 };
727
733 template < typename Key, typename T, typename Compare, typename Allocator >
734 void swap(map< Key, T, Compare, Allocator >& lhs, map< Key, T, Compare, Allocator >& rhs) noexcept(noexcept(lhs.swap(rhs)))
735 {
736 lhs.swap(rhs);
737 }
738
745 template < typename Key, typename T, typename Compare, typename Allocator >
747 {
748 return lhs.m_map == rhs.m_map;
749 }
750
757 template < typename Key, typename T, typename Compare, typename Allocator >
759 {
760 return !(lhs == rhs);
761 }
762
769 template < typename Key, typename T, typename Compare, typename Allocator >
771 {
772 if (lhs.size() != rhs.size())
773 {
774 return lhs.size() < rhs.size();
775 }
776
777 return lhs.m_map < rhs.m_map;
778 }
779
786 template < typename Key, typename T, typename Compare, typename Allocator >
788 {
789 return rhs < lhs;
790 }
791
798 template < typename Key, typename T, typename Compare, typename Allocator >
800 {
801 return !(rhs < lhs);
802 }
803
810 template < typename Key, typename T, typename Compare, typename Allocator >
812 {
813 return !(lhs < rhs);
814 }
815
822 template < typename Key, typename T, typename Compare, typename Allocator >
823 auto operator<=>(map< Key, T, Compare, Allocator > const& lhs, map< Key, T, Compare, Allocator > const& rhs) -> decltype(std::declval< typename map< Key, T, Compare, Allocator >::underlying_type const& >() <=> std::declval< typename map< Key, T, Compare, Allocator >::underlying_type const& >())
824 {
825 using ordering_type = decltype(lhs.m_map <=> rhs.m_map);
826
827 if (lhs.size() < rhs.size())
828 {
829 return ordering_type::less;
830 }
831
832 if (rhs.size() < lhs.size())
833 {
834 return ordering_type::greater;
835 }
836
837 return lhs.m_map <=> rhs.m_map;
838 }
839} // namespace rpnx
840
841#endif // RPNXDATASTRUCTURES_MAP_HPP
Ordered key-value container with size-first ordering.
Definition map.hpp:31
map(InputIt first, InputIt last, Compare const &comp=Compare(), Allocator const &alloc=Allocator())
Constructs a map from an iterator range.
Definition map.hpp:107
const_iterator upper_bound(Key const &key) const
Finds the first element ordered after a key.
Definition map.hpp:695
std::pair< iterator, bool > emplace(Args &&... args)
Constructs a key-value pair in place if its key is absent.
Definition map.hpp:450
typename underlying_type::allocator_type allocator_type
Allocator type used to manage nodes.
Definition map.hpp:50
typename underlying_type::mapped_type mapped_type
Value associated with each key.
Definition map.hpp:38
typename underlying_type::const_reference const_reference
Immutable stored-value reference type.
Definition map.hpp:54
T const & at(Key const &key) const
Returns the mapped value for an existing key.
Definition map.hpp:214
T & at(Key const &key)
Returns the mapped value for an existing key.
Definition map.hpp:208
typename underlying_type::size_type size_type
Unsigned type used for element counts.
Definition map.hpp:42
iterator insert(const_iterator hint, value_type const &value)
Inserts a copied key-value pair using an ordering hint.
Definition map.hpp:374
typename underlying_type::const_iterator const_iterator
Immutable bidirectional iterator type.
Definition map.hpp:62
iterator end() noexcept
Returns an iterator one past the final key-value pair.
Definition map.hpp:258
iterator erase(const_iterator pos)
Erases one element.
Definition map.hpp:577
iterator lower_bound(Key const &key)
Finds the first element not ordered before a key.
Definition map.hpp:677
map & operator=(map &&) noexcept(std::is_nothrow_move_assignable_v< underlying_type >)=default
Move-assigns another map.
typename underlying_type::value_compare value_compare
Function object used to order stored key-value pairs by key.
Definition map.hpp:48
iterator insert(const_iterator hint, P &&value)
Inserts a pair-like value using an ordering hint.
Definition map.hpp:399
bool empty() const noexcept
Returns whether the map has no elements.
Definition map.hpp:312
insert_return_type insert(node_type &&node)
Inserts an extracted node if its key is absent.
Definition map.hpp:427
std::pair< const_iterator, const_iterator > equal_range(Key const &key) const
Finds the range matching a key.
Definition map.hpp:671
void swap(map &other) noexcept(noexcept(m_map.swap(other.m_map)))
Exchanges contents with another map.
Definition map.hpp:595
reverse_iterator rbegin() noexcept
Returns a reverse iterator to the final key-value pair.
Definition map.hpp:276
iterator erase(const_iterator first, const_iterator last)
Erases a range.
Definition map.hpp:583
std::pair< iterator, bool > insert_or_assign(Key &&key, M &&obj)
Inserts a moved key or assigns its existing mapped value.
Definition map.hpp:543
iterator insert_or_assign(const_iterator hint, Key const &key, M &&obj)
Inserts a copied key or assigns its value using an ordering hint.
Definition map.hpp:557
const_iterator cend() const noexcept
Returns an immutable iterator one past the final key-value pair.
Definition map.hpp:270
reverse_iterator rend() noexcept
Returns a reverse iterator preceding the first key-value pair.
Definition map.hpp:294
size_type max_size() const noexcept
Returns the maximum number of elements supported by the implementation.
Definition map.hpp:324
std::map< Key, T, Compare, Allocator > underlying_type
Underlying ordered associative container type.
Definition map.hpp:34
T & operator[](Key const &key)
Returns the mapped value, inserting a default value when absent.
Definition map.hpp:224
map(map &&) noexcept(std::is_nothrow_move_constructible_v< underlying_type >)=default
Move-constructs a map.
key_compare key_comp() const
Returns the key-ordering predicate.
Definition map.hpp:701
iterator try_emplace(const_iterator hint, Key const &key, Args &&... args)
Constructs a mapped value for an absent copied key using an ordering hint.
Definition map.hpp:503
typename underlying_type::insert_return_type insert_return_type
Result returned when inserting a node handle without a hint.
Definition map.hpp:70
std::pair< iterator, bool > insert(value_type &&value)
Inserts a key-value pair by moving it if its key is absent.
Definition map.hpp:350
iterator try_emplace(const_iterator hint, Key &&key, Args &&... args)
Constructs a mapped value for an absent moved key using an ordering hint.
Definition map.hpp:517
std::pair< iterator, bool > insert(P &&value)
Inserts a value constructible as a key-value pair if its key is absent.
Definition map.hpp:363
value_compare value_comp() const
Returns the stored-value ordering predicate.
Definition map.hpp:707
size_type size() const noexcept
Returns the number of stored key-value pairs.
Definition map.hpp:318
iterator emplace_hint(const_iterator hint, Args &&... args)
Constructs a key-value pair in place using an ordering hint.
Definition map.hpp:463
const_reverse_iterator rend() const noexcept
Returns an immutable reverse iterator preceding the first key-value pair.
Definition map.hpp:300
void insert(std::initializer_list< value_type > init)
Inserts key-value pairs from an initializer list.
Definition map.hpp:417
typename underlying_type::const_pointer const_pointer
Immutable stored-value pointer type.
Definition map.hpp:58
std::pair< iterator, bool > insert(value_type const &value)
Inserts a key-value pair if its key is absent.
Definition map.hpp:340
std::pair< iterator, iterator > equal_range(Key const &key)
Finds the range matching a key.
Definition map.hpp:665
map(map &&other, Allocator const &alloc)
Move-constructs a map using the specified allocator.
Definition map.hpp:166
std::pair< iterator, bool > insert_or_assign(Key const &key, M &&obj)
Inserts a copied key or assigns its existing mapped value.
Definition map.hpp:530
size_type erase(Key const &key)
Erases the element with a key.
Definition map.hpp:589
map(std::initializer_list< value_type > init, Compare const &comp=Compare(), Allocator const &alloc=Allocator())
Constructs a map from an initializer list.
Definition map.hpp:129
typename underlying_type::iterator iterator
Mutable bidirectional iterator type.
Definition map.hpp:60
const_iterator lower_bound(Key const &key) const
Finds the first element not ordered before a key.
Definition map.hpp:683
const_reverse_iterator rbegin() const noexcept
Returns an immutable reverse iterator to the final key-value pair.
Definition map.hpp:282
const_reverse_iterator crend() const noexcept
Returns an immutable reverse iterator preceding the first key-value pair.
Definition map.hpp:306
friend auto operator<=>(map< K, U, C, A > const &lhs, map< K, U, C, A > const &rhs) -> decltype(std::declval< typename map< K, U, C, A >::underlying_type const & >()<=> std::declval< typename map< K, U, C, A >::underlying_type const & >())
Grants three-way comparison access to the underlying map.
typename underlying_type::reference reference
Mutable stored-value reference type.
Definition map.hpp:52
map(map const &)=default
Copy-constructs a map.
const_iterator find(Key const &key) const
Finds an element by key.
Definition map.hpp:653
T & operator[](Key &&key)
Returns the mapped value, moving the key into a new element when absent.
Definition map.hpp:234
iterator insert(const_iterator hint, node_type &&node)
Inserts an extracted node using an ordering hint.
Definition map.hpp:438
std::pair< iterator, bool > try_emplace(Key const &key, Args &&... args)
Constructs a mapped value only when a copied key is absent.
Definition map.hpp:476
typename underlying_type::const_reverse_iterator const_reverse_iterator
Immutable reverse-iterator type.
Definition map.hpp:66
void merge(map< Key, T, C2, Allocator > &source)
Transfers non-duplicate nodes from another RPNX map.
Definition map.hpp:614
size_type count(Key const &key) const
Counts elements matching a key.
Definition map.hpp:641
iterator insert_or_assign(const_iterator hint, Key &&key, M &&obj)
Inserts a moved key or assigns its value using an ordering hint.
Definition map.hpp:571
typename underlying_type::node_type node_type
Owning handle for an extracted node.
Definition map.hpp:68
iterator find(Key const &key)
Finds an element by key.
Definition map.hpp:647
void merge(std::map< Key, T, C2, Allocator > &&source)
Transfers non-duplicate nodes from a standard map.
Definition map.hpp:635
friend bool operator<(map< K, U, C, A > const &lhs, map< K, U, C, A > const &rhs)
Grants less-than comparison access to the underlying map.
node_type extract(const_iterator pos)
Removes an element without destroying it.
Definition map.hpp:601
allocator_type get_allocator() const noexcept
Returns the allocator used by this map.
Definition map.hpp:197
std::pair< iterator, bool > try_emplace(Key &&key, Args &&... args)
Constructs a mapped value only when a moved key is absent.
Definition map.hpp:489
typename underlying_type::key_compare key_compare
Function object used to order keys.
Definition map.hpp:46
map(Allocator const &alloc)
Constructs an empty map with an allocator.
Definition map.hpp:94
void insert(InputIt first, InputIt last)
Inserts every key-value pair in an iterator range.
Definition map.hpp:411
typename underlying_type::pointer pointer
Mutable stored-value pointer type.
Definition map.hpp:56
typename underlying_type::difference_type difference_type
Signed type used for iterator distances.
Definition map.hpp:44
node_type extract(Key const &key)
Removes an element by key without destroying it.
Definition map.hpp:607
map(std::initializer_list< value_type > init, Allocator const &alloc)
Constructs a map from an initializer list and allocator.
Definition map.hpp:138
const_reverse_iterator crbegin() const noexcept
Returns an immutable reverse iterator to the final key-value pair.
Definition map.hpp:288
bool contains(Key const &key) const
Tests whether a key is present.
Definition map.hpp:659
friend bool operator==(map< K, U, C, A > const &lhs, map< K, U, C, A > const &rhs)
Grants equality comparison access to the underlying map.
typename underlying_type::reverse_iterator reverse_iterator
Mutable reverse-iterator type.
Definition map.hpp:64
typename underlying_type::value_type value_type
Stored key-value pair type.
Definition map.hpp:40
map(InputIt first, InputIt last, Allocator const &alloc)
Constructs a map from an iterator range and allocator.
Definition map.hpp:119
map(Compare const &comp, Allocator const &alloc=Allocator())
Constructs an empty map with a comparator and allocator.
Definition map.hpp:86
map & operator=(map const &)=default
Copy-assigns another map.
const_iterator begin() const noexcept
Returns an immutable iterator to the first key-value pair.
Definition map.hpp:246
const_iterator cbegin() const noexcept
Returns an immutable iterator to the first key-value pair.
Definition map.hpp:252
iterator insert(const_iterator hint, value_type &&value)
Inserts a moved key-value pair using an ordering hint.
Definition map.hpp:385
typename underlying_type::key_type key_type
Key type used to order and identify elements.
Definition map.hpp:36
map()=default
Constructs an empty map.
void clear() noexcept
Removes all key-value pairs.
Definition map.hpp:330
void merge(map< Key, T, C2, Allocator > &&source)
Transfers non-duplicate nodes from another RPNX map.
Definition map.hpp:621
void merge(std::map< Key, T, C2, Allocator > &source)
Transfers non-duplicate nodes from a standard map.
Definition map.hpp:628
const_iterator end() const noexcept
Returns an immutable iterator one past the final key-value pair.
Definition map.hpp:264
iterator begin() noexcept
Returns an iterator to the first key-value pair.
Definition map.hpp:240
iterator upper_bound(Key const &key)
Finds the first element ordered after a key.
Definition map.hpp:689
Containers, iterator adapters, callable wrappers, and value utilities.
Definition annex.hpp:14
void swap(annex< T, Alloc > &lhs, annex< T, Alloc > &rhs) noexcept(noexcept(lhs.swap(rhs)))
Swaps two annex objects.
Definition annex.hpp:577
bool operator<=(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
Orders two annex objects.
Definition annex.hpp:651
bool operator>=(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
Orders two annex objects.
Definition annex.hpp:663
bool operator<(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
Orders two annex objects.
Definition annex.hpp:627
bool operator!=(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
Compares two annex objects for inequality.
Definition annex.hpp:615
bool operator>(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
Orders two annex objects.
Definition annex.hpp:639
auto operator<=>(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs) -> decltype(*lhs<=> *rhs)
Three-way compares two annex objects when T supports <=>.
Definition annex.hpp:676
bool operator==(annex< T, Alloc > const &lhs, annex< T, Alloc > const &rhs)
Compares two annex objects for equality.
Definition annex.hpp:598