Embedded Template Library 1.0
Loading...
Searching...
No Matches
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) 2015 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_FLAT_MULTISET_INCLUDED
32#define ETL_FLAT_MULTISET_INCLUDED
33
34#include "platform.h"
36#include "pool.h"
37#include "placement_new.h"
38#include "nth_type.h"
39#include "type_traits.h"
40#include "initializer_list.h"
41
43
44//*****************************************************************************
50//*****************************************************************************
51
52namespace etl
53{
54 //***************************************************************************
58 //***************************************************************************
59 template <typename T, typename TKeyCompare = etl::less<T> >
60 class iflat_multiset : private etl::ireference_flat_multiset<T, TKeyCompare>
61 {
62 private:
63
65 typedef typename refset_t::lookup_t lookup_t;
66 typedef etl::ipool storage_t;
67
68 typedef const T& key_parameter_t;
69
70 public:
71
72 typedef T key_type;
73 typedef T value_type;
75 typedef value_type& reference;
76 typedef const value_type& const_reference;
77#if ETL_USING_CPP11
78 typedef value_type&& rvalue_reference;
79#endif
80 typedef value_type* pointer;
81 typedef const value_type* const_pointer;
82 typedef size_t size_type;
83
84 typedef typename refset_t::iterator iterator;
86
87 typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
88 typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
89 typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
90
91 public:
92
93 //*********************************************************************
96 //*********************************************************************
98 {
99 return refset_t::begin();
100 }
101
102 //*********************************************************************
105 //*********************************************************************
107 {
108 return refset_t::begin();
109 }
110
111 //*********************************************************************
114 //*********************************************************************
116 {
117 return refset_t::end();
118 }
119
120 //*********************************************************************
123 //*********************************************************************
125 {
126 return refset_t::end();
127 }
128
129 //*********************************************************************
132 //*********************************************************************
134 {
135 return refset_t::cbegin();
136 }
137
138 //*********************************************************************
141 //*********************************************************************
143 {
144 return refset_t::cend();
145 }
146
147 //*********************************************************************
150 //*********************************************************************
151 reverse_iterator rbegin()
152 {
153 return refset_t::rbegin();
154 }
155
156 //*********************************************************************
159 //*********************************************************************
160 const_reverse_iterator rbegin() const
161 {
162 return refset_t::rbegin();
163 }
164
165 //*********************************************************************
168 //*********************************************************************
169 reverse_iterator rend()
170 {
171 return refset_t::rend();
172 }
173
174 //*********************************************************************
177 //*********************************************************************
178 const_reverse_iterator rend() const
179 {
180 return refset_t::rend();
181 }
182
183 //*********************************************************************
186 //*********************************************************************
187 const_reverse_iterator crbegin() const
188 {
189 return refset_t::crbegin();
190 }
191
192 //*********************************************************************
195 //*********************************************************************
196 const_reverse_iterator crend() const
197 {
198 return refset_t::crend();
199 }
200
201 //*********************************************************************
207 //*********************************************************************
208 template <typename TIterator>
209 void assign(TIterator first, TIterator last)
210 {
211#if ETL_IS_DEBUG_BUILD
212 difference_type d = etl::distance(first, last);
213 ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
214#endif
215
216 clear();
217
218 while (first != last)
219 {
220 insert(*first);
221 ++first;
222 }
223 }
224
225 //*********************************************************************
229 //*********************************************************************
230 ETL_OR_STD::pair<iterator, bool> insert(const_reference value)
231 {
232 ETL_OR_STD::pair<iterator, bool> result(end(), false);
233
234 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
235
236 iterator i_element = etl::upper_bound(begin(), end(), value, compare);
237
238 value_type* pvalue = storage.allocate<value_type>();
239 ::new (pvalue) value_type(value);
240 ETL_INCREMENT_DEBUG_COUNT;
242
243 return result;
244 }
245
246#if ETL_USING_CPP11
247 //*********************************************************************
251 //*********************************************************************
252 ETL_OR_STD::pair<iterator, bool> insert(rvalue_reference value)
253 {
254 ETL_OR_STD::pair<iterator, bool> result(end(), false);
255
256 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
257
258 iterator i_element = etl::upper_bound(begin(), end(), value, compare);
259
260 value_type* pvalue = storage.allocate<value_type>();
261 ::new (pvalue) value_type(etl::move(value));
262 ETL_INCREMENT_DEBUG_COUNT;
264
265 return result;
266 }
267#endif
268
269 //*********************************************************************
274 //*********************************************************************
275 iterator insert(const_iterator /*position*/, const_reference value)
276 {
277 return insert(value).first;
278 }
279
280#if ETL_USING_CPP11
281 //*********************************************************************
286 //*********************************************************************
287 iterator insert(const_iterator /*position*/, rvalue_reference value)
288 {
289 return insert(etl::move(value)).first;
290 }
291#endif
292
293 //*********************************************************************
299 //*********************************************************************
300 template <class TIterator>
301 void insert(TIterator first, TIterator last)
302 {
303 while (first != last)
304 {
305 insert(*first);
306 ++first;
307 }
308 }
309
310 //*************************************************************************
312 //*************************************************************************
313 template <typename T1>
314 ETL_OR_STD::pair<iterator, bool> emplace(const_reference value)
315 {
316 return insert(value);
317 }
318
319 //*************************************************************************
321 //*************************************************************************
322#if ETL_USING_CPP11 && ETL_NOT_USING_STLPORT && !defined(ETL_FLAT_MULTISET_FORCE_CPP03_IMPLEMENTATION)
323 template <typename ... Args>
324 ETL_OR_STD::pair<iterator, bool> emplace(Args && ... args)
325 {
326 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
327
328 // Create it.
329 value_type* pvalue = storage.allocate<value_type>();
330 ::new (pvalue) value_type(etl::forward<Args>(args)...);
331
333
334 ETL_INCREMENT_DEBUG_COUNT;
335 return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
336 }
337#else
338 //*************************************************************************
340 //*************************************************************************
341 ETL_OR_STD::pair<iterator, bool> emplace()
342 {
343 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
344
345 // Create it.
346 value_type* pvalue = storage.allocate<value_type>();
347 ::new (pvalue) value_type();
348
350
351 ETL_INCREMENT_DEBUG_COUNT;
352 return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
353 }
354
355 //*************************************************************************
357 //*************************************************************************
358 template <typename T1>
359 ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1)
360 {
361 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
362
363 // Create it.
364 value_type* pvalue = storage.allocate<value_type>();
365 ::new (pvalue) value_type(value1);
366
368
369 ETL_INCREMENT_DEBUG_COUNT;
370 return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
371 }
372
373 //*************************************************************************
375 //*************************************************************************
376 template <typename T1, typename T2>
377 ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1, const T2& value2)
378 {
379 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
380
381 // Create it.
382 value_type* pvalue = storage.allocate<value_type>();
383 ::new (pvalue) value_type(value1, value2);
384
386
387 ETL_INCREMENT_DEBUG_COUNT;
388 return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
389 }
390
391 //*************************************************************************
393 //*************************************************************************
394 template <typename T1, typename T2, typename T3>
395 ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3)
396 {
397 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
398
399 // Create it.
400 value_type* pvalue = storage.allocate<value_type>();
401 ::new (pvalue) value_type(value1, value2, value3);
402
404
405 ETL_INCREMENT_DEBUG_COUNT;
406 return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
407 }
408
409 //*************************************************************************
411 //*************************************************************************
412 template <typename T1, typename T2, typename T3, typename T4>
413 ETL_OR_STD::pair<iterator, bool> emplace(const T1& value1, const T2& value2, const T3& value3, const T4& value4)
414 {
415 ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
416
417 // Create it.
418 value_type* pvalue = storage.allocate<value_type>();
419 ::new (pvalue) value_type(value1, value2, value3, value4);
420
422
423 ETL_INCREMENT_DEBUG_COUNT;
424 return ETL_OR_STD::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
425 }
426#endif
427
428 //*********************************************************************
432 //*********************************************************************
433 size_t erase(key_parameter_t key)
434 {
435 ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
436
437 if (range.first == end())
438 {
439 return 0;
440 }
441 else
442 {
443 size_t d = etl::distance(range.first, range.second);
444 erase(range.first, range.second);
445 return d;
446 }
447 }
448
449#if ETL_USING_CPP11
450 //*********************************************************************
452 size_t erase(K&& key)
453 {
454 ETL_OR_STD::pair<iterator, iterator> range = equal_range(etl::forward<K>(key));
455
456 if (range.first == end())
457 {
458 return 0;
459 }
460 else
461 {
462 size_t d = etl::distance(range.first, range.second);
463 erase(range.first, range.second);
464 return d;
465 }
466 }
467#endif
468
469 //*********************************************************************
472 //*********************************************************************
474 {
477 ETL_DECREMENT_DEBUG_COUNT;
479 }
480
481 //*********************************************************************
484 //*********************************************************************
486 {
489 ETL_DECREMENT_DEBUG_COUNT;
491 }
492
493 //*********************************************************************
499 //*********************************************************************
501 {
502 const_iterator itr = first;
503
504 while (itr != last)
505 {
507 storage.release(etl::addressof(*itr));
508 ++itr;
509 ETL_DECREMENT_DEBUG_COUNT;
510 }
511
512 return refset_t::erase(first, last);
513 }
514
515 //*************************************************************************
517 //*************************************************************************
518 void clear()
519 {
521 {
522 storage.release_all();
523 }
524 else
525 {
526 iterator itr = begin();
527
528 while (itr != end())
529 {
531 storage.release(etl::addressof(*itr));
532 ++itr;
533 }
534 }
535
536 ETL_RESET_DEBUG_COUNT;
538 }
539
540 //*********************************************************************
544 //*********************************************************************
545 iterator find(key_parameter_t key)
546 {
547 return refset_t::find(key);
548 }
549
550#if ETL_USING_CPP11
551 //*********************************************************************
553 iterator find(const K& key)
554 {
555 return refset_t::find(key);
556 }
557#endif
558
559 //*********************************************************************
563 //*********************************************************************
564 const_iterator find(key_parameter_t key) const
565 {
566 return refset_t::find(key);
567 }
568
569#if ETL_USING_CPP11
570 //*********************************************************************
572 const_iterator find(const K& key) const
573 {
574 return refset_t::find(key);
575 }
576#endif
577
578 //*********************************************************************
582 //*********************************************************************
583 size_t count(key_parameter_t key) const
584 {
585 return refset_t::count(key);
586 }
587
588#if ETL_USING_CPP11
589 //*********************************************************************
591 size_t count(const K& key) const
592 {
593 return refset_t::count(key);
594 }
595#endif
596
597 //*********************************************************************
601 //*********************************************************************
602 iterator lower_bound(key_parameter_t key)
603 {
604 return refset_t::lower_bound(key);
605 }
606
607#if ETL_USING_CPP11
608 //*********************************************************************
610 iterator lower_bound(const K& key)
611 {
612 return refset_t::lower_bound(key);
613 }
614#endif
615
616 //*********************************************************************
620 //*********************************************************************
621 const_iterator lower_bound(key_parameter_t key) const
622 {
623 return refset_t::lower_bound(key);
624 }
625
626#if ETL_USING_CPP11
627 //*********************************************************************
629 const_iterator lower_bound(const K& key) const
630 {
631 return refset_t::lower_bound(key);
632 }
633#endif
634
635 //*********************************************************************
639 //*********************************************************************
640 iterator upper_bound(key_parameter_t key)
641 {
642 return refset_t::upper_bound(key);
643 }
644
645#if ETL_USING_CPP11
646 //*********************************************************************
648 iterator upper_bound(const K& key)
649 {
650 return refset_t::upper_bound(key);
651 }
652#endif
653
654 //*********************************************************************
658 //*********************************************************************
659 const_iterator upper_bound(key_parameter_t key) const
660 {
661 return refset_t::upper_bound(key);
662 }
663
664#if ETL_USING_CPP11
665 //*********************************************************************
667 const_iterator upper_bound(const K& key) const
668 {
669 return refset_t::upper_bound(key);
670 }
671#endif
672
673 //*********************************************************************
677 //*********************************************************************
678 ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
679 {
680 return refset_t::equal_range(key);
681 }
682
683#if ETL_USING_CPP11
684 //*********************************************************************
686 ETL_OR_STD::pair<iterator, iterator> equal_range(const K& key)
687 {
688 return refset_t::equal_range(key);
689 }
690#endif
691
692 //*********************************************************************
696 //*********************************************************************
697 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
698 {
699 return refset_t::equal_range(key);
700 }
701
702#if ETL_USING_CPP11
703 //*********************************************************************
705 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const K& key) const
706 {
707 return refset_t::equal_range(key);
708 }
709#endif
710
711 //*************************************************************************
713 //*************************************************************************
714 bool contains(key_parameter_t key) const
715 {
716 return find(key) != end();
717 }
718
719#if ETL_USING_CPP11
720 //*************************************************************************
722 bool contains(const K& k) const
723 {
724 return find(k) != end();
725 }
726#endif
727
728 //*************************************************************************
730 //*************************************************************************
732 {
733 if (&rhs != this)
734 {
735 assign(rhs.cbegin(), rhs.cend());
736 }
737
738 return *this;
739 }
740
741#if ETL_USING_CPP11
742 //*************************************************************************
744 //*************************************************************************
746 {
747 move_container(etl::move(rhs));
748
749 return *this;
750 }
751#endif
752
753 //*************************************************************************
756 //*************************************************************************
758 {
759 return refset_t::size();
760 }
761
762 //*************************************************************************
765 //*************************************************************************
766 bool empty() const
767 {
768 return refset_t::empty();
769 }
770
771 //*************************************************************************
774 //*************************************************************************
775 bool full() const
776 {
777 return refset_t::full();
778 }
779
780 //*************************************************************************
783 //*************************************************************************
785 {
786 return refset_t::capacity();
787 }
788
789 //*************************************************************************
792 //*************************************************************************
794 {
795 return refset_t::max_size();
796 }
797
798 //*************************************************************************
801 //*************************************************************************
802 size_t available() const
803 {
804 return refset_t::available();
805 }
806
807 protected:
808
809 //*********************************************************************
811 //*********************************************************************
817
818#if ETL_USING_CPP11
819 //*************************************************************************
822 //*************************************************************************
824 {
825 if (&rhs != this)
826 {
827 this->clear();
828
831
832 // Move all of the elements.
833 while (first != last)
834 {
836 ++temp;
837
838 this->insert(etl::move(*first));
839 first = temp;
840 }
841 }
842 }
843#endif
844
845 private:
846
847 // Disable copy construction.
848 iflat_multiset(const iflat_multiset&);
849
850 storage_t& storage;
851
852 TKeyCompare compare;
853
855 ETL_DECLARE_DEBUG_COUNT;
856
857 //*************************************************************************
859 //*************************************************************************
860#if defined(ETL_POLYMORPHIC_FLAT_MULTISET) || defined(ETL_POLYMORPHIC_CONTAINERS)
861 public:
862 virtual ~iflat_multiset()
863 {
864 }
865#else
866 protected:
868 {
869 }
870#endif
871 };
872
873 //***************************************************************************
879 //***************************************************************************
880 template <typename T, typename TKeyCompare>
882 {
883 return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
884 }
885
886 //***************************************************************************
892 //***************************************************************************
893 template <typename T, typename TKeyCompare>
898
899 //***************************************************************************
905 //***************************************************************************
906 template <typename T, const size_t MAX_SIZE_, typename TCompare = etl::less<T> >
907 class flat_multiset : public etl::iflat_multiset<T, TCompare>
908 {
909 public:
910
911 static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
912
913 //*************************************************************************
915 //*************************************************************************
917 : etl::iflat_multiset<T, TCompare>(lookup, storage)
918 {
919 }
920
921 //*************************************************************************
923 //*************************************************************************
925 : iflat_multiset<T, TCompare>(lookup, storage)
926 {
927 this->assign(other.cbegin(), other.cend());
928 }
929
930#if ETL_USING_CPP11
931 //*************************************************************************
933 //*************************************************************************
935 : etl::iflat_multiset<T, TCompare>(lookup, storage)
936 {
937 if (&other != this)
938 {
939 this->move_container(etl::move(other));
940 }
941 }
942#endif
943
944 //*************************************************************************
949 //*************************************************************************
950 template <typename TIterator>
952 : iflat_multiset<T, TCompare>(lookup, storage)
953 {
954 this->assign(first, last);
955 }
956
957#if ETL_HAS_INITIALIZER_LIST
958 //*************************************************************************
960 //*************************************************************************
961 flat_multiset(std::initializer_list<T> init)
962 : iflat_multiset<T, TCompare>(lookup, storage)
963 {
964 this->assign(init.begin(), init.end());
965 }
966#endif
967
968 //*************************************************************************
970 //*************************************************************************
972 {
973 this->clear();
974 }
975
976 //*************************************************************************
978 //*************************************************************************
980 {
981 if (&rhs != this)
982 {
983 this->assign(rhs.cbegin(), rhs.cend());
984 }
985
986 return *this;
987 }
988
989#if ETL_USING_CPP11
990 //*************************************************************************
992 //*************************************************************************
994 {
995 if (&rhs != this)
996 {
997 this->move_container(etl::move(rhs));
998 }
999
1000 return *this;
1001 }
1002#endif
1003
1004 private:
1005
1006 typedef typename etl::iflat_multiset<T, TCompare>::value_type node_t;
1007
1008 // The pool of nodes.
1010
1011 // The vector that stores pointers to the nodes.
1013 };
1014
1015 template <typename T,const size_t MAX_SIZE_, typename TCompare>
1016 ETL_CONSTANT size_t flat_multiset<T, MAX_SIZE_, TCompare>::MAX_SIZE;
1017
1018 //*************************************************************************
1020 //*************************************************************************
1021#if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST
1022 template <typename... T>
1023 flat_multiset(T...) -> flat_multiset<etl::nth_type_t<0, T...>, sizeof...(T)>;
1024#endif
1025
1026 //*************************************************************************
1028 //*************************************************************************
1029#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
1030 template <typename TKey, typename TKeyCompare = etl::less<TKey>, typename... T>
1031 constexpr auto make_flat_multiset(T&&... keys) -> etl::flat_multiset<TKey, sizeof...(T), TKeyCompare>
1032 {
1033 return { etl::forward<T>(keys)... };
1034 }
1035#endif
1036}
1037
1038#endif
Definition reference_flat_multiset.h:71
Definition reference_flat_multiset.h:204
Definition reference_flat_multiset.h:121
Definition reference_flat_multiset.h:101
iterator upper_bound(parameter_t key)
Definition reference_flat_multiset.h:736
size_t count(parameter_t key) const
Definition reference_flat_multiset.h:675
ETL_OR_STD::pair< iterator, bool > insert_at(iterator i_element, reference value)
Definition reference_flat_multiset.h:884
iterator begin()
Definition reference_flat_multiset.h:310
reverse_iterator rbegin()
Definition reference_flat_multiset.h:364
size_t erase(parameter_t key)
Definition reference_flat_multiset.h:502
bool empty() const
Definition reference_flat_multiset.h:828
reverse_iterator rend()
Definition reference_flat_multiset.h:382
size_t available() const
Definition reference_flat_multiset.h:864
iterator find(parameter_t key)
Definition reference_flat_multiset.h:581
size_type size() const
Definition reference_flat_multiset.h:819
bool full() const
Definition reference_flat_multiset.h:837
void clear()
Clears the reference_flat_multiset.
Definition reference_flat_multiset.h:571
iterator end()
Definition reference_flat_multiset.h:328
iterator lower_bound(parameter_t key)
Definition reference_flat_multiset.h:698
ETL_OR_STD::pair< iterator, iterator > equal_range(parameter_t key)
Definition reference_flat_multiset.h:774
size_type capacity() const
Definition reference_flat_multiset.h:846
const_reverse_iterator crbegin() const
Definition reference_flat_multiset.h:400
const_reverse_iterator crend() const
Definition reference_flat_multiset.h:409
const_iterator cend() const
Definition reference_flat_multiset.h:355
size_type max_size() const
Definition reference_flat_multiset.h:855
const_iterator cbegin() const
Definition reference_flat_multiset.h:346
#define ETL_ASSERT(b, e)
Definition error_handler.h:316
void clear()
Clears the flat_multiset.
Definition flat_multiset.h:518
ETL_OR_STD::pair< iterator, iterator > equal_range(key_parameter_t key)
Definition flat_multiset.h:678
const_reverse_iterator crbegin() const
Definition flat_multiset.h:187
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(key_parameter_t key) const
Definition flat_multiset.h:697
const_iterator end() const
Definition flat_multiset.h:124
iterator erase(const_iterator i_element)
Definition flat_multiset.h:485
const_reverse_iterator rbegin() const
Definition flat_multiset.h:160
const_reverse_iterator rend() const
Definition flat_multiset.h:178
iterator erase(iterator i_element)
Definition flat_multiset.h:473
flat_multiset()
Constructor.
Definition flat_multiset.h:916
iflat_multiset(lookup_t &lookup_, storage_t &storage_)
Constructor.
Definition flat_multiset.h:812
iterator begin()
Definition flat_multiset.h:97
void insert(TIterator first, TIterator last)
Definition flat_multiset.h:301
ETL_OR_STD::pair< iterator, bool > insert(const_reference value)
Definition flat_multiset.h:230
const_iterator cend() const
Definition flat_multiset.h:142
iterator erase(const_iterator first, const_iterator last)
Definition flat_multiset.h:500
iterator lower_bound(key_parameter_t key)
Definition flat_multiset.h:602
void assign(TIterator first, TIterator last)
Definition flat_multiset.h:209
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
Emplaces a value to the set.
Definition flat_multiset.h:413
~iflat_multiset()
Destructor.
Definition flat_multiset.h:867
iterator find(key_parameter_t key)
Definition flat_multiset.h:545
const_iterator find(key_parameter_t key) const
Definition flat_multiset.h:564
bool contains(key_parameter_t key) const
Check if the map contains the key.
Definition flat_multiset.h:714
const_iterator lower_bound(key_parameter_t key) const
Definition flat_multiset.h:621
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1, const T2 &value2, const T3 &value3)
Emplaces a value to the set.
Definition flat_multiset.h:395
size_t count(key_parameter_t key) const
Definition flat_multiset.h:583
reverse_iterator rend()
Definition flat_multiset.h:169
bool empty() const
Definition flat_multiset.h:766
~flat_multiset()
Destructor.
Definition flat_multiset.h:971
const_reverse_iterator crend() const
Definition flat_multiset.h:196
flat_multiset(TIterator first, TIterator last)
Definition flat_multiset.h:951
size_type max_size() const
Definition flat_multiset.h:793
ETL_OR_STD::pair< iterator, bool > emplace(const_reference value)
Emplaces a value to the set.
Definition flat_multiset.h:314
const_iterator upper_bound(key_parameter_t key) const
Definition flat_multiset.h:659
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1)
Emplaces a value to the set.
Definition flat_multiset.h:359
size_type capacity() const
Definition flat_multiset.h:784
flat_multiset & operator=(const flat_multiset &rhs)
Assignment operator.
Definition flat_multiset.h:979
iterator end()
Definition flat_multiset.h:115
const_iterator begin() const
Definition flat_multiset.h:106
const_iterator cbegin() const
Definition flat_multiset.h:133
reverse_iterator rbegin()
Definition flat_multiset.h:151
bool full() const
Definition flat_multiset.h:775
size_t erase(key_parameter_t key)
Definition flat_multiset.h:433
iterator upper_bound(key_parameter_t key)
Definition flat_multiset.h:640
size_type size() const
Definition flat_multiset.h:757
ETL_OR_STD::pair< iterator, bool > emplace(const T1 &value1, const T2 &value2)
Emplaces a value to the set.
Definition flat_multiset.h:377
size_t available() const
Definition flat_multiset.h:802
flat_multiset(const flat_multiset &other)
Copy constructor.
Definition flat_multiset.h:924
iterator insert(const_iterator, const_reference value)
Definition flat_multiset.h:275
ETL_OR_STD::pair< iterator, bool > emplace()
Emplaces a value to the set.
Definition flat_multiset.h:341
iflat_multiset & operator=(const iflat_multiset &rhs)
Assignment operator.
Definition flat_multiset.h:731
Definition flat_multiset.h:908
Definition flat_multiset.h:61
ETL_CONSTEXPR17 etl::enable_if<!etl::is_same< T, etl::nullptr_t >::value, T >::type * addressof(T &t)
Definition addressof.h:52
etl::enable_if< etl::is_trivially_destructible< T >::value, void >::type destroy_at(T *)
Definition memory.h:1006
void release_all()
Release all objects in the pool.
Definition ipool.h:248
T * allocate()
Definition ipool.h:113
void release(const void *const p_object)
Definition ipool.h:239
Definition ipool.h:102
bitset_ext
Definition absolute.h:38
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:654
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:642
Definition compare.h:51
Definition type_traits_generator.h:2101
iterator
Definition iterator.h:399
pair holds two objects of arbitrary type
Definition utility.h:164