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 iterator insert(const_iterator /*position*/, value_type& value)
489 {
490 return insert(value).first;
491 }
492
493 //*********************************************************************
500 //*********************************************************************
501 template <class TIterator>
502 void insert(TIterator first, TIterator last)
503 {
504 while (first != last)
505 {
506 insert(*first);
507 ++first;
508 }
509 }
510
511 //*********************************************************************
515 //*********************************************************************
516 size_t erase(parameter_t key)
517 {
518 ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
519
520 if (range.first == end())
521 {
522 return 0;
523 }
524 else
525 {
526 size_t d = static_cast<size_t>(etl::distance(range.first, range.second));
527 erase(range.first, range.second);
528 return d;
529 }
530 }
531
532 //*********************************************************************
533#if ETL_USING_CPP11
534 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
535 size_t erase(K&& key)
536 {
537 ETL_OR_STD::pair<iterator, iterator> range = equal_range(etl::forward<K>(key));
538
539 if (range.first == end())
540 {
541 return 0;
542 }
543 else
544 {
545 size_t d = static_cast<size_t>(etl::distance(range.first, range.second));
546 erase(range.first, range.second);
547 return d;
548 }
549 }
550#endif
551
552 //*********************************************************************
555 //*********************************************************************
556 iterator erase(iterator i_element)
557 {
558 return lookup.erase(i_element.ilookup);
559 }
560
561 //*********************************************************************
564 //*********************************************************************
565 iterator erase(const_iterator i_element)
566 {
567 return lookup.erase(i_element.ilookup);
568 }
569
570 //*********************************************************************
576 //*********************************************************************
577 iterator erase(const_iterator first, const_iterator last)
578 {
579 return lookup.erase(first.ilookup, last.ilookup);
580 }
581
582 //*************************************************************************
584 //*************************************************************************
585 void clear()
586 {
587 lookup.clear();
588 }
589
590 //*********************************************************************
594 //*********************************************************************
595 iterator find(parameter_t key)
596 {
597 iterator itr = etl::lower_bound(begin(), end(), key, compare);
598
599 if (itr != end())
600 {
601 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
602 {
603 return itr;
604 }
605 else
606 {
607 return end();
608 }
609 }
610
611 return end();
612 }
613
614#if ETL_USING_CPP11
615 //*********************************************************************
616 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
617 iterator find(const K& key)
618 {
619 iterator itr = etl::lower_bound(begin(), end(), key, compare);
620
621 if (itr != end())
622 {
623 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
624 {
625 return itr;
626 }
627 else
628 {
629 return end();
630 }
631 }
632
633 return end();
634 }
635#endif
636
637 //*********************************************************************
641 //*********************************************************************
642 const_iterator find(parameter_t key) const
643 {
644 const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
645
646 if (itr != end())
647 {
648 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
649 {
650 return itr;
651 }
652 else
653 {
654 return end();
655 }
656 }
657
658 return end();
659 }
660
661#if ETL_USING_CPP11
662 //*********************************************************************
663 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
664 const_iterator find(const K& key) const
665 {
666 const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
667
668 if (itr != end())
669 {
670 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
671 {
672 return itr;
673 }
674 else
675 {
676 return end();
677 }
678 }
679
680 return end();
681 }
682#endif
683
684 //*********************************************************************
688 //*********************************************************************
689 size_t count(parameter_t key) const
690 {
691 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
692
693 return static_cast<size_t>(etl::distance(range.first, range.second));
694 }
695
696#if ETL_USING_CPP11
697 //*********************************************************************
698 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
699 size_t count(const K& key) const
700 {
701 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
702
703 return static_cast<size_t>(etl::distance(range.first, range.second));
704 }
705#endif
706
707 //*********************************************************************
711 //*********************************************************************
712 iterator lower_bound(parameter_t key)
713 {
714 return etl::lower_bound(begin(), end(), key, compare);
715 }
716
717#if ETL_USING_CPP11
718 //*********************************************************************
719 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
720 iterator lower_bound(const K& key)
721 {
722 return etl::lower_bound(begin(), end(), key, compare);
723 }
724#endif
725
726 //*********************************************************************
730 //*********************************************************************
731 const_iterator lower_bound(parameter_t key) const
732 {
733 return etl::lower_bound(cbegin(), cend(), key, compare);
734 }
735
736#if ETL_USING_CPP11
737 //*********************************************************************
738 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
739 const_iterator lower_bound(const K& key) const
740 {
741 return etl::lower_bound(cbegin(), cend(), key, compare);
742 }
743#endif
744
745 //*********************************************************************
749 //*********************************************************************
750 iterator upper_bound(parameter_t key)
751 {
752 return etl::upper_bound(begin(), end(), key, compare);
753 }
754
755#if ETL_USING_CPP11
756 //*********************************************************************
757 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
758 iterator upper_bound(const K& key)
759 {
760 return etl::upper_bound(begin(), end(), key, compare);
761 }
762#endif
763
764 //*********************************************************************
768 //*********************************************************************
769 const_iterator upper_bound(parameter_t key) const
770 {
771 return etl::upper_bound(cbegin(), cend(), key, compare);
772 }
773
774#if ETL_USING_CPP11
775 //*********************************************************************
776 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
777 const_iterator upper_bound(const K& key) const
778 {
779 return etl::upper_bound(cbegin(), cend(), key, compare);
780 }
781#endif
782
783 //*********************************************************************
787 //*********************************************************************
788 ETL_OR_STD::pair<iterator, iterator> equal_range(parameter_t key)
789 {
790 return etl::equal_range(begin(), end(), key, compare);
791 }
792
793#if ETL_USING_CPP11
794 //*********************************************************************
795 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
796 ETL_OR_STD::pair<iterator, iterator> equal_range(const K& key)
797 {
798 return etl::equal_range(begin(), end(), key, compare);
799 }
800#endif
801
802 //*************************************************************************
804 //*************************************************************************
805 bool contains(parameter_t key) const
806 {
807 return find(key) != end();
808 }
809
810#if ETL_USING_CPP11
811 //*************************************************************************
812 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
813 bool contains(const K& k) const
814 {
815 return find(k) != end();
816 }
817#endif
818
819 //*********************************************************************
823 //*********************************************************************
824 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
825 {
826 return etl::equal_range(begin(), end(), key, compare);
827 }
828
829 //*************************************************************************
832 //*************************************************************************
833 size_type size() const
834 {
835 return lookup.size();
836 }
837
838 //*************************************************************************
841 //*************************************************************************
842 bool empty() const
843 {
844 return lookup.empty();
845 }
846
847 //*************************************************************************
850 //*************************************************************************
851 bool full() const
852 {
853 return lookup.full();
854 }
855
856 //*************************************************************************
859 //*************************************************************************
860 size_type capacity() const
861 {
862 return lookup.capacity();
863 }
864
865 //*************************************************************************
868 //*************************************************************************
869 size_type max_size() const
870 {
871 return lookup.max_size();
872 }
873
874 //*************************************************************************
877 //*************************************************************************
878 size_t available() const
879 {
880 return lookup.available();
881 }
882
883 protected:
884
885 //*********************************************************************
887 //*********************************************************************
888 ireference_flat_multiset(lookup_t& lookup_)
889 : lookup(lookup_)
890 {
891 }
892
893 //*********************************************************************
897 //*********************************************************************
898 ETL_OR_STD::pair<iterator, bool> insert_at(iterator i_element, reference value)
899 {
900 ETL_OR_STD::pair<iterator, bool> result(end(), false);
901
902 if (i_element == end())
903 {
904 // At the end.
905 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
906
907 lookup.push_back(&value);
908 result.first = --end();
909 result.second = true;
910 }
911 else
912 {
913 // Not at the end.
914 result.first = i_element;
915
916 // A new one.
917 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
918 lookup.insert(i_element.ilookup, &value);
919 result.second = true;
920 }
921
922 return result;
923 }
924
925 private:
926
927 // Disable copy construction.
930
931 lookup_t& lookup;
932
933 TKeyCompare compare;
934
935 //*************************************************************************
937 //*************************************************************************
938#if defined(ETL_POLYMORPHIC_REFERENCE_FLAT_MULTISET) || defined(ETL_POLYMORPHIC_CONTAINERS)
939
940 public:
941
942 virtual ~ireference_flat_multiset() {}
943#else
944
945 protected:
946
948#endif
949 };
950
951 //***************************************************************************
954 //***************************************************************************
955 template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etl::less<TKey> >
956 class reference_flat_multiset : public ireference_flat_multiset<TKey, TKeyCompare>
957 {
958 public:
959
960 static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
961
962 using typename ireference_flat_multiset<TKey, TKeyCompare>::value_type;
963
964 //*************************************************************************
966 //*************************************************************************
968 : ireference_flat_multiset<TKey, TKeyCompare>(lookup)
969 {
970 }
971
972 //*************************************************************************
974 //*************************************************************************
980
981 //*************************************************************************
986 //*************************************************************************
987 template <typename TIterator>
988 reference_flat_multiset(TIterator first, TIterator last)
989 : ireference_flat_multiset<TKey, TKeyCompare>(lookup)
990 {
992 }
993
994 //*************************************************************************
996 //*************************************************************************
1001
1002 private:
1003
1004 // The vector that stores pointers to the nodes.
1006 };
1007
1008 template <typename TKey, const size_t MAX_SIZE_, typename TCompare>
1009 ETL_CONSTANT size_t reference_flat_multiset<TKey, MAX_SIZE_, TCompare>::MAX_SIZE;
1010
1011 //*************************************************************************
1013 //*************************************************************************
1014#if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST
1015 template <typename... T>
1016 reference_flat_multiset(T...) -> reference_flat_multiset<etl::nth_type_t<0, T...>, sizeof...(T)>;
1017#endif
1018
1019 //*************************************************************************
1021 //*************************************************************************
1022#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
1023 template <typename TKey, typename TKeyCompare = etl::less<TKey>, typename... T>
1024 constexpr auto make_reference_flat_multiset(T&&... keys) -> etl::reference_flat_multiset<TKey, sizeof...(T), TKeyCompare>
1025 {
1026 return {etl::forward<T>(keys)...};
1027 }
1028#endif
1029
1030 //***************************************************************************
1036 //***************************************************************************
1037 template <typename T, typename TKeyCompare>
1039 {
1040 return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
1041 }
1042
1043 //***************************************************************************
1049 //***************************************************************************
1050 template <typename T, typename TKeyCompare>
1052 {
1053 return !(lhs == rhs);
1054 }
1055} // namespace etl
1056
1057#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:750
iterator erase(const_iterator first, const_iterator last)
Definition reference_flat_multiset.h:577
iterator erase(iterator i_element)
Definition reference_flat_multiset.h:556
iterator erase(const_iterator i_element)
Definition reference_flat_multiset.h:565
size_t count(parameter_t key) const
Definition reference_flat_multiset.h:689
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:898
iterator begin()
Definition reference_flat_multiset.h:307
const_iterator find(parameter_t key) const
Definition reference_flat_multiset.h:642
~ireference_flat_multiset()
Destructor.
Definition reference_flat_multiset.h:947
const_iterator upper_bound(parameter_t key) const
Definition reference_flat_multiset.h:769
ireference_flat_multiset(lookup_t &lookup_)
Constructor.
Definition reference_flat_multiset.h:888
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(parameter_t key) const
Definition reference_flat_multiset.h:824
reverse_iterator rbegin()
Definition reference_flat_multiset.h:364
size_t erase(parameter_t key)
Definition reference_flat_multiset.h:516
bool empty() const
Definition reference_flat_multiset.h:842
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:488
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:878
void insert(TIterator first, TIterator last)
Definition reference_flat_multiset.h:502
iterator find(parameter_t key)
Definition reference_flat_multiset.h:595
size_type size() const
Definition reference_flat_multiset.h:833
const_iterator lower_bound(parameter_t key) const
Definition reference_flat_multiset.h:731
bool contains(parameter_t key) const
Check if the map contains the key.
Definition reference_flat_multiset.h:805
bool full() const
Definition reference_flat_multiset.h:851
void clear()
Clears the reference_flat_multiset.
Definition reference_flat_multiset.h:585
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:712
ETL_OR_STD::pair< iterator, iterator > equal_range(parameter_t key)
Definition reference_flat_multiset.h:788
size_type capacity() const
Definition reference_flat_multiset.h:860
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:869
void assign(TIterator first, TIterator last)
Definition reference_flat_multiset.h:433
const_iterator cbegin() const
Definition reference_flat_multiset.h:345
Definition reference_flat_multiset.h:957
reference_flat_multiset(const reference_flat_multiset &other)
Copy constructor.
Definition reference_flat_multiset.h:975
~reference_flat_multiset()
Destructor.
Definition reference_flat_multiset.h:997
reference_flat_multiset()
Constructor.
Definition reference_flat_multiset.h:967
reference_flat_multiset(TIterator first, TIterator last)
Definition reference_flat_multiset.h:988
ETL_CONSTEXPR14 bool operator!=(const etl::bitset< Active_Bits, TElement > &lhs, const etl::bitset< Active_Bits, TElement > &rhs) ETL_NOEXCEPT
Definition bitset_new.h:2529
#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:71
Definition vector.h:1277
bitset_ext
Definition absolute.h:40
ETL_CONSTEXPR14 bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1081
ETL_CONSTEXPR14 bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1093
ETL_CONSTEXPR TContainer::iterator end(TContainer &container)
Definition iterator.h:997
Definition compare.h:51
iterator
Definition iterator.h:424
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