Embedded Template Library 1.0
Loading...
Searching...
No Matches
reference_flat_multiset.h
Go to the documentation of this file.
1
2
3/******************************************************************************
4The MIT License(MIT)
5
6Embedded Template Library.
7https://github.com/ETLCPP/etl
8https://www.etlcpp.com
9
10Copyright(c) 2017 John Wellbelove
11
12Permission is hereby granted, free of charge, to any person obtaining a copy
13of this software and associated documentation files(the "Software"), to deal
14in the Software without restriction, including without limitation the rights
15to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
16copies of the Software, and to permit persons to whom the Software is
17furnished to do so, subject to the following conditions :
18
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21
22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28SOFTWARE.
29******************************************************************************/
30
31#ifndef ETL_REFERENCE_FLAT_MULTISET_INCLUDED
32#define ETL_REFERENCE_FLAT_MULTISET_INCLUDED
33
34#include "platform.h"
35#include "algorithm.h"
36#include "error_handler.h"
37#include "exception.h"
38#include "functional.h"
39#include "iterator.h"
40#include "nth_type.h"
41#include "pool.h"
42#include "type_traits.h"
43#include "utility.h"
44#include "vector.h"
45
47
48#include <stddef.h>
49
50namespace etl
51{
52 //***************************************************************************
55 //***************************************************************************
56 class flat_multiset_exception : public exception
57 {
58 public:
59
60 flat_multiset_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
61 : exception(reason_, file_name_, line_number_)
62 {
63 }
64 };
65
66 //***************************************************************************
69 //***************************************************************************
70 class flat_multiset_full : public flat_multiset_exception
71 {
72 public:
73
74 flat_multiset_full(string_type file_name_, numeric_type line_number_)
75 : flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:full", ETL_REFERENCE_FLAT_MULTISET_FILE_ID"A"), file_name_, line_number_)
76 {
77 }
78 };
79
80 //***************************************************************************
83 //***************************************************************************
84 class flat_multiset_iterator : public flat_multiset_exception
85 {
86 public:
87
88 flat_multiset_iterator(string_type file_name_, numeric_type line_number_)
89 : flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:iterator", ETL_REFERENCE_FLAT_MULTISET_FILE_ID"B"), file_name_, line_number_)
90 {
91 }
92 };
93
94 //***************************************************************************
99 //***************************************************************************
100 template <typename T, typename TKeyCompare = etl::less<T> >
102 {
103 public:
104
105 typedef T key_type;
106 typedef T value_type;
107 typedef TKeyCompare key_compare;
108 typedef value_type& reference;
109 typedef const value_type& const_reference;
110 typedef value_type* pointer;
111 typedef const value_type* const_pointer;
112 typedef size_t size_type;
113
114 protected:
115
116 typedef etl::ivector<value_type*> lookup_t;
117
118 public:
119
120 //*************************************************************************
121 class iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, value_type>
122 {
123 public:
124
125 friend class ireference_flat_multiset;
126
127 iterator() {}
128
129 iterator(typename lookup_t::iterator ilookup_)
130 : ilookup(ilookup_)
131 {
132 }
133
134 iterator(const iterator& other)
135 : ilookup(other.ilookup)
136 {
137 }
138
139 iterator& operator=(const iterator& other)
140 {
141 ilookup = other.ilookup;
142 return *this;
143 }
144
145 iterator& operator++()
146 {
147 ++ilookup;
148 return *this;
149 }
150
151 iterator operator++(int)
152 {
153 iterator temp(*this);
154 ++ilookup;
155 return temp;
156 }
157
158 iterator& operator--()
159 {
160 --ilookup;
161 return *this;
162 }
163
164 iterator operator--(int)
165 {
166 iterator temp(*this);
167 --ilookup;
168 return temp;
169 }
170
171 reference operator*() const
172 {
173 return *(*ilookup);
174 }
175
176 pointer operator&() const
177 {
178 return etl::addressof(*(*ilookup));
179 }
180
181 pointer operator->() const
182 {
183 return etl::addressof(*(*ilookup));
184 }
185
186 friend bool operator==(const iterator& lhs, const iterator& rhs)
187 {
188 return lhs.ilookup == rhs.ilookup;
189 }
190
191 friend bool operator!=(const iterator& lhs, const iterator& rhs)
192 {
193 return !(lhs == rhs);
194 }
195
196 private:
197
198 typename lookup_t::iterator ilookup;
199 };
200
201 //*************************************************************************
202 class const_iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, const value_type>
203 {
204 public:
205
206 friend class ireference_flat_multiset;
207
208 const_iterator() {}
209
210 const_iterator(typename lookup_t::const_iterator ilookup_)
211 : ilookup(ilookup_)
212 {
213 }
214
215 const_iterator(const typename ireference_flat_multiset::iterator& other)
216 : ilookup(other.ilookup)
217 {
218 }
219
220 const_iterator(const const_iterator& other)
221 : ilookup(other.ilookup)
222 {
223 }
224
225 const_iterator& operator=(const iterator& other)
226 {
227 ilookup = other.ilookup;
228 return *this;
229 }
230
231 const_iterator& operator=(const const_iterator& other)
232 {
233 ilookup = other.ilookup;
234 return *this;
235 }
236
237 const_iterator& operator++()
238 {
239 ++ilookup;
240 return *this;
241 }
242
243 const_iterator operator++(int)
244 {
245 const_iterator temp(*this);
246 ++ilookup;
247 return temp;
248 }
249
250 const_iterator& operator--()
251 {
252 --ilookup;
253 return *this;
254 }
255
256 const_iterator operator--(int)
257 {
258 const_iterator temp(*this);
259 --ilookup;
260 return temp;
261 }
262
263 const_reference operator*() const
264 {
265 return *(*ilookup);
266 }
267
268 const_pointer operator&() const
269 {
270 return etl::addressof(*(*ilookup));
271 }
272
273 const_pointer operator->() const
274 {
275 return etl::addressof(*(*ilookup));
276 }
277
278 friend bool operator==(const const_iterator& lhs, const const_iterator& rhs)
279 {
280 return lhs.ilookup == rhs.ilookup;
281 }
282
283 friend bool operator!=(const const_iterator& lhs, const const_iterator& rhs)
284 {
285 return !(lhs == rhs);
286 }
287
288 private:
289
290 typename lookup_t::const_iterator ilookup;
291 };
292
293 protected:
294
295 typedef typename etl::parameter_type<T>::type parameter_t;
296
297 public:
298
299 typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
300 typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
301 typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
302
303 //*********************************************************************
306 //*********************************************************************
307 iterator begin()
308 {
309 return iterator(lookup.begin());
310 }
311
312 //*********************************************************************
316 //*********************************************************************
317 const_iterator begin() const
318 {
319 return const_iterator(lookup.begin());
320 }
321
322 //*********************************************************************
325 //*********************************************************************
326 iterator end()
327 {
328 return iterator(lookup.end());
329 }
330
331 //*********************************************************************
334 //*********************************************************************
335 const_iterator end() const
336 {
337 return const_iterator(lookup.end());
338 }
339
340 //*********************************************************************
344 //*********************************************************************
345 const_iterator cbegin() const
346 {
347 return const_iterator(lookup.cbegin());
348 }
349
350 //*********************************************************************
353 //*********************************************************************
354 const_iterator cend() const
355 {
356 return const_iterator(lookup.cend());
357 }
358
359 //*********************************************************************
363 //*********************************************************************
364 reverse_iterator rbegin()
365 {
366 return reverse_iterator(lookup.rbegin());
367 }
368
369 //*********************************************************************
374 //*********************************************************************
375 const_reverse_iterator rbegin() const
376 {
377 return const_reverse_iterator(lookup.rbegin());
378 }
379
380 //*********************************************************************
384 //*********************************************************************
385 reverse_iterator rend()
386 {
387 return reverse_iterator(lookup.rend());
388 }
389
390 //*********************************************************************
395 //*********************************************************************
396 const_reverse_iterator rend() const
397 {
398 return const_reverse_iterator(lookup.rend());
399 }
400
401 //*********************************************************************
406 //*********************************************************************
407 const_reverse_iterator crbegin() const
408 {
409 return const_reverse_iterator(lookup.crbegin());
410 }
411
412 //*********************************************************************
417 //*********************************************************************
418 const_reverse_iterator crend() const
419 {
420 return const_reverse_iterator(lookup.crend());
421 }
422
423 //*********************************************************************
431 //*********************************************************************
432 template <typename TIterator>
433 void assign(TIterator first, TIterator last)
434 {
435#if ETL_IS_DEBUG_BUILD
436 difference_type d = etl::distance(first, last);
437 ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
438#endif
439
440 clear();
441
442 while (first != last)
443 {
444 insert(*first);
445 ++first;
446 }
447 }
448
449 //*********************************************************************
454 //*********************************************************************
455 ETL_OR_STD::pair<iterator, bool> insert(value_type& value)
456 {
457 ETL_OR_STD::pair<iterator, bool> result(end(), false);
458
459 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
460
461 iterator i_element = etl::upper_bound(begin(), end(), value, compare);
462
463 if (i_element == end())
464 {
465 // At the end. Doesn't exist.
466 lookup.push_back(&value);
467 result.first = --end();
468 result.second = true;
469 }
470 else
471 {
472 // Not at the end.
473 lookup.insert(i_element.ilookup, &value);
474 result.first = i_element;
475 result.second = true;
476 }
477
478 return result;
479 }
480
481 //*********************************************************************
487 //*********************************************************************
488 ETL_OR_STD::pair<iterator, bool> emplace(value_type& value)
489 {
490 return insert(value);
491 }
492
493 //*********************************************************************
499 //*********************************************************************
500 iterator insert(const_iterator /*position*/, value_type& value)
501 {
502 return insert(value).first;
503 }
504
505 //*********************************************************************
512 //*********************************************************************
513 template <class TIterator>
514 void insert(TIterator first, TIterator last)
515 {
516 while (first != last)
517 {
518 insert(*first);
519 ++first;
520 }
521 }
522
523 //*********************************************************************
527 //*********************************************************************
528 size_t erase(parameter_t key)
529 {
530 ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
531
532 if (range.first == end())
533 {
534 return 0;
535 }
536 else
537 {
538 size_t d = static_cast<size_t>(etl::distance(range.first, range.second));
539 erase(range.first, range.second);
540 return d;
541 }
542 }
543
544 //*********************************************************************
545#if ETL_USING_CPP11
546 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
547 size_t erase(K&& key)
548 {
549 ETL_OR_STD::pair<iterator, iterator> range = equal_range(etl::forward<K>(key));
550
551 if (range.first == end())
552 {
553 return 0;
554 }
555 else
556 {
557 size_t d = static_cast<size_t>(etl::distance(range.first, range.second));
558 erase(range.first, range.second);
559 return d;
560 }
561 }
562#endif
563
564 //*********************************************************************
567 //*********************************************************************
568 iterator erase(iterator i_element)
569 {
570 return lookup.erase(i_element.ilookup);
571 }
572
573 //*********************************************************************
576 //*********************************************************************
577 iterator erase(const_iterator i_element)
578 {
579 return lookup.erase(i_element.ilookup);
580 }
581
582 //*********************************************************************
588 //*********************************************************************
589 iterator erase(const_iterator first, const_iterator last)
590 {
591 return lookup.erase(first.ilookup, last.ilookup);
592 }
593
594 //*************************************************************************
596 //*************************************************************************
597 void clear()
598 {
599 lookup.clear();
600 }
601
602 //*********************************************************************
606 //*********************************************************************
607 iterator find(parameter_t key)
608 {
609 iterator itr = etl::lower_bound(begin(), end(), key, compare);
610
611 if (itr != end())
612 {
613 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
614 {
615 return itr;
616 }
617 else
618 {
619 return end();
620 }
621 }
622
623 return end();
624 }
625
626#if ETL_USING_CPP11
627 //*********************************************************************
628 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
629 iterator find(const K& key)
630 {
631 iterator itr = etl::lower_bound(begin(), end(), key, compare);
632
633 if (itr != end())
634 {
635 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
636 {
637 return itr;
638 }
639 else
640 {
641 return end();
642 }
643 }
644
645 return end();
646 }
647#endif
648
649 //*********************************************************************
653 //*********************************************************************
654 const_iterator find(parameter_t key) const
655 {
656 const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
657
658 if (itr != end())
659 {
660 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
661 {
662 return itr;
663 }
664 else
665 {
666 return end();
667 }
668 }
669
670 return end();
671 }
672
673#if ETL_USING_CPP11
674 //*********************************************************************
675 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
676 const_iterator find(const K& key) const
677 {
678 const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
679
680 if (itr != end())
681 {
682 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
683 {
684 return itr;
685 }
686 else
687 {
688 return end();
689 }
690 }
691
692 return end();
693 }
694#endif
695
696 //*********************************************************************
700 //*********************************************************************
701 size_t count(parameter_t key) const
702 {
703 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
704
705 return static_cast<size_t>(etl::distance(range.first, range.second));
706 }
707
708#if ETL_USING_CPP11
709 //*********************************************************************
710 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
711 size_t count(const K& key) const
712 {
713 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
714
715 return static_cast<size_t>(etl::distance(range.first, range.second));
716 }
717#endif
718
719 //*********************************************************************
723 //*********************************************************************
724 iterator lower_bound(parameter_t key)
725 {
726 return etl::lower_bound(begin(), end(), key, compare);
727 }
728
729#if ETL_USING_CPP11
730 //*********************************************************************
731 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
732 iterator lower_bound(const K& key)
733 {
734 return etl::lower_bound(begin(), end(), key, compare);
735 }
736#endif
737
738 //*********************************************************************
742 //*********************************************************************
743 const_iterator lower_bound(parameter_t key) const
744 {
745 return etl::lower_bound(cbegin(), cend(), key, compare);
746 }
747
748#if ETL_USING_CPP11
749 //*********************************************************************
750 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
751 const_iterator lower_bound(const K& key) const
752 {
753 return etl::lower_bound(cbegin(), cend(), key, compare);
754 }
755#endif
756
757 //*********************************************************************
761 //*********************************************************************
762 iterator upper_bound(parameter_t key)
763 {
764 return etl::upper_bound(begin(), end(), key, compare);
765 }
766
767#if ETL_USING_CPP11
768 //*********************************************************************
769 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
770 iterator upper_bound(const K& key)
771 {
772 return etl::upper_bound(begin(), end(), key, compare);
773 }
774#endif
775
776 //*********************************************************************
780 //*********************************************************************
781 const_iterator upper_bound(parameter_t key) const
782 {
783 return etl::upper_bound(cbegin(), cend(), key, compare);
784 }
785
786#if ETL_USING_CPP11
787 //*********************************************************************
788 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
789 const_iterator upper_bound(const K& key) const
790 {
791 return etl::upper_bound(cbegin(), cend(), key, compare);
792 }
793#endif
794
795 //*********************************************************************
799 //*********************************************************************
800 ETL_OR_STD::pair<iterator, iterator> equal_range(parameter_t key)
801 {
802 return etl::equal_range(begin(), end(), key, compare);
803 }
804
805#if ETL_USING_CPP11
806 //*********************************************************************
807 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
808 ETL_OR_STD::pair<iterator, iterator> equal_range(const K& key)
809 {
810 return etl::equal_range(begin(), end(), key, compare);
811 }
812#endif
813
814 //*************************************************************************
816 //*************************************************************************
817 bool contains(parameter_t key) const
818 {
819 return find(key) != end();
820 }
821
822#if ETL_USING_CPP11
823 //*************************************************************************
824 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
825 bool contains(const K& k) const
826 {
827 return find(k) != end();
828 }
829#endif
830
831 //*********************************************************************
835 //*********************************************************************
836 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
837 {
838 return etl::equal_range(begin(), end(), key, compare);
839 }
840
841 //*************************************************************************
844 //*************************************************************************
845 size_type size() const
846 {
847 return lookup.size();
848 }
849
850 //*************************************************************************
853 //*************************************************************************
854 bool empty() const
855 {
856 return lookup.empty();
857 }
858
859 //*************************************************************************
862 //*************************************************************************
863 bool full() const
864 {
865 return lookup.full();
866 }
867
868 //*************************************************************************
871 //*************************************************************************
872 size_type capacity() const
873 {
874 return lookup.capacity();
875 }
876
877 //*************************************************************************
880 //*************************************************************************
881 size_type max_size() const
882 {
883 return lookup.max_size();
884 }
885
886 //*************************************************************************
889 //*************************************************************************
890 size_t available() const
891 {
892 return lookup.available();
893 }
894
895 protected:
896
897 //*********************************************************************
899 //*********************************************************************
900 ireference_flat_multiset(lookup_t& lookup_)
901 : lookup(lookup_)
902 {
903 }
904
905 //*********************************************************************
909 //*********************************************************************
910 ETL_OR_STD::pair<iterator, bool> insert_at(iterator i_element, reference value)
911 {
912 ETL_OR_STD::pair<iterator, bool> result(end(), false);
913
914 if (i_element == end())
915 {
916 // At the end.
917 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
918
919 lookup.push_back(&value);
920 result.first = --end();
921 result.second = true;
922 }
923 else
924 {
925 // Not at the end.
926 result.first = i_element;
927
928 // A new one.
929 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
930 lookup.insert(i_element.ilookup, &value);
931 result.second = true;
932 }
933
934 return result;
935 }
936
937 private:
938
939 // Disable copy construction.
942
943 lookup_t& lookup;
944
945 TKeyCompare compare;
946
947 //*************************************************************************
949 //*************************************************************************
950#if defined(ETL_POLYMORPHIC_REFERENCE_FLAT_MULTISET) || defined(ETL_POLYMORPHIC_CONTAINERS)
951
952 public:
953
954 virtual ~ireference_flat_multiset() {}
955#else
956
957 protected:
958
960#endif
961 };
962
963 //***************************************************************************
966 //***************************************************************************
967 template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etl::less<TKey> >
968 class reference_flat_multiset : public ireference_flat_multiset<TKey, TKeyCompare>
969 {
970 public:
971
972 static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
973
974 using typename ireference_flat_multiset<TKey, TKeyCompare>::value_type;
975
976 //*************************************************************************
978 //*************************************************************************
980 : ireference_flat_multiset<TKey, TKeyCompare>(lookup)
981 {
982 }
983
984 //*************************************************************************
986 //*************************************************************************
992
993 //*************************************************************************
998 //*************************************************************************
999 template <typename TIterator>
1000 reference_flat_multiset(TIterator first, TIterator last)
1001 : ireference_flat_multiset<TKey, TKeyCompare>(lookup)
1002 {
1004 }
1005
1006 //*************************************************************************
1008 //*************************************************************************
1013
1014 private:
1015
1016 // The vector that stores pointers to the nodes.
1018 };
1019
1020 template <typename TKey, const size_t MAX_SIZE_, typename TCompare>
1021 ETL_CONSTANT size_t reference_flat_multiset<TKey, MAX_SIZE_, TCompare>::MAX_SIZE;
1022
1023 //*************************************************************************
1025 //*************************************************************************
1026#if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST
1027 template <typename... T>
1028 reference_flat_multiset(T...) -> reference_flat_multiset<etl::nth_type_t<0, T...>, sizeof...(T)>;
1029#endif
1030
1031 //*************************************************************************
1033 //*************************************************************************
1034#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
1035 template <typename TKey, typename TKeyCompare = etl::less<TKey>, typename... T>
1036 constexpr auto make_reference_flat_multiset(T&&... keys) -> etl::reference_flat_multiset<TKey, sizeof...(T), TKeyCompare>
1037 {
1038 return {etl::forward<T>(keys)...};
1039 }
1040#endif
1041
1042 //***************************************************************************
1048 //***************************************************************************
1049 template <typename T, typename TKeyCompare>
1051 {
1052 return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
1053 }
1054
1055 //***************************************************************************
1061 //***************************************************************************
1062 template <typename T, typename TKeyCompare>
1064 {
1065 return !(lhs == rhs);
1066 }
1067} // namespace etl
1068
1069#endif
Definition reference_flat_multiset.h:71
Definition reference_flat_multiset.h:122
Definition reference_flat_multiset.h:102
iterator upper_bound(parameter_t key)
Definition reference_flat_multiset.h:762
iterator erase(const_iterator first, const_iterator last)
Definition reference_flat_multiset.h:589
iterator erase(iterator i_element)
Definition reference_flat_multiset.h:568
iterator erase(const_iterator i_element)
Definition reference_flat_multiset.h:577
size_t count(parameter_t key) const
Definition reference_flat_multiset.h:701
const_iterator begin() const
Definition reference_flat_multiset.h:317
ETL_OR_STD::pair< iterator, bool > insert_at(iterator i_element, reference value)
Definition reference_flat_multiset.h:910
iterator begin()
Definition reference_flat_multiset.h:307
const_iterator find(parameter_t key) const
Definition reference_flat_multiset.h:654
~ireference_flat_multiset()
Destructor.
Definition reference_flat_multiset.h:959
const_iterator upper_bound(parameter_t key) const
Definition reference_flat_multiset.h:781
ireference_flat_multiset(lookup_t &lookup_)
Constructor.
Definition reference_flat_multiset.h:900
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(parameter_t key) const
Definition reference_flat_multiset.h:836
reverse_iterator rbegin()
Definition reference_flat_multiset.h:364
size_t erase(parameter_t key)
Definition reference_flat_multiset.h:528
bool empty() const
Definition reference_flat_multiset.h:854
const_iterator end() const
Definition reference_flat_multiset.h:335
reverse_iterator rend()
Definition reference_flat_multiset.h:385
iterator insert(const_iterator, value_type &value)
Definition reference_flat_multiset.h:500
ETL_OR_STD::pair< iterator, bool > insert(value_type &value)
Definition reference_flat_multiset.h:455
size_t available() const
Definition reference_flat_multiset.h:890
void insert(TIterator first, TIterator last)
Definition reference_flat_multiset.h:514
iterator find(parameter_t key)
Definition reference_flat_multiset.h:607
size_type size() const
Definition reference_flat_multiset.h:845
const_iterator lower_bound(parameter_t key) const
Definition reference_flat_multiset.h:743
ETL_OR_STD::pair< iterator, bool > emplace(value_type &value)
Definition reference_flat_multiset.h:488
bool contains(parameter_t key) const
Check if the map contains the key.
Definition reference_flat_multiset.h:817
bool full() const
Definition reference_flat_multiset.h:863
void clear()
Clears the reference_flat_multiset.
Definition reference_flat_multiset.h:597
iterator end()
Definition reference_flat_multiset.h:326
const_reverse_iterator rbegin() const
Definition reference_flat_multiset.h:375
iterator lower_bound(parameter_t key)
Definition reference_flat_multiset.h:724
ETL_OR_STD::pair< iterator, iterator > equal_range(parameter_t key)
Definition reference_flat_multiset.h:800
size_type capacity() const
Definition reference_flat_multiset.h:872
const_reverse_iterator crbegin() const
Definition reference_flat_multiset.h:407
const_reverse_iterator crend() const
Definition reference_flat_multiset.h:418
const_iterator cend() const
Definition reference_flat_multiset.h:354
const_reverse_iterator rend() const
Definition reference_flat_multiset.h:396
size_type max_size() const
Definition reference_flat_multiset.h:881
void assign(TIterator first, TIterator last)
Definition reference_flat_multiset.h:433
const_iterator cbegin() const
Definition reference_flat_multiset.h:345
Definition vector.h:65
Definition reference_flat_multiset.h:969
reference_flat_multiset(const reference_flat_multiset &other)
Copy constructor.
Definition reference_flat_multiset.h:987
~reference_flat_multiset()
Destructor.
Definition reference_flat_multiset.h:1009
reference_flat_multiset()
Constructor.
Definition reference_flat_multiset.h:979
reference_flat_multiset(TIterator first, TIterator last)
Definition reference_flat_multiset.h:1000
#define ETL_ASSERT(b, e)
Definition error_handler.h:511
ETL_EXCEPTION_CONSTEXPR exception(string_type reason_, string_type, numeric_type)
Constructor.
Definition exception.h:81
ETL_CONSTEXPR17 etl::enable_if<!etl::is_same< T, etl::nullptr_t >::value, T >::type * addressof(T &t)
Definition addressof.h:52
Definition vector.h:1830
Definition absolute.h:40
ETL_CONSTEXPR14 bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1078
ETL_CONSTEXPR14 bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1090
TContainer::iterator end(TContainer &container)
Definition iterator.h:1166
Definition compare.h:51
iterator
Definition iterator.h:482
etl::conditional< etl::is_fundamental< T >::value||etl::is_pointer< T >::value, T, constT & >::type type
By default fundamental and pointer types are passed by value.
Definition parameter_type.h:46
ETL_CONSTEXPR14 bool operator==(const etl::to_arithmetic_result< T > &lhs, const etl::to_arithmetic_result< T > &rhs)
Equality test for etl::to_arithmetic_result.
Definition to_arithmetic.h:903
ETL_CONSTEXPR14 bool operator!=(const etl::to_arithmetic_result< T > &lhs, const etl::to_arithmetic_result< T > &rhs)
Inequality test for etl::to_arithmetic_result.
Definition to_arithmetic.h:937