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 "iterator.h"
37#include "functional.h"
38#include "utility.h"
39#include "type_traits.h"
40#include "nth_type.h"
41#include "vector.h"
42#include "pool.h"
43#include "error_handler.h"
44#include "exception.h"
45
47
48#include <stddef.h>
49
50namespace etl
51{
52 //***************************************************************************
55 //***************************************************************************
65
66 //***************************************************************************
69 //***************************************************************************
71 {
72 public:
73
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 //***************************************************************************
85 {
86 public:
87
89 : flat_multiset_exception(ETL_ERROR_TEXT("flat_multiset:iterator", ETL_REFERENCE_FLAT_MULTISET_FILE_ID"C"), file_name_, line_number_)
90 {
91 }
92 };
93
94 //***************************************************************************
98 //***************************************************************************
99 template <typename T, typename TKeyCompare = etl::less<T> >
101 {
102 public:
103
104 typedef T key_type;
105 typedef T value_type;
106 typedef TKeyCompare key_compare;
107 typedef value_type& reference;
108 typedef const value_type& const_reference;
109 typedef value_type* pointer;
110 typedef const value_type* const_pointer;
111 typedef size_t size_type;
112
113 protected:
114
116
117 public:
118
119 //*************************************************************************
120 class iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, value_type>
121 {
122 public:
123
124 friend class ireference_flat_multiset;
125
126 iterator()
127 {
128 }
129
130 iterator(typename lookup_t::iterator ilookup_)
131 : ilookup(ilookup_)
132 {
133 }
134
135 iterator(const iterator& other)
136 : ilookup(other.ilookup)
137 {
138 }
139
141 {
142 ilookup = other.ilookup;
143 return *this;
144 }
145
147 {
148 ++ilookup;
149 return *this;
150 }
151
153 {
154 iterator temp(*this);
155 ++ilookup;
156 return temp;
157 }
158
160 {
161 --ilookup;
162 return *this;
163 }
164
166 {
167 iterator temp(*this);
168 --ilookup;
169 return temp;
170 }
171
172 reference operator *() const
173 {
174 return *(*ilookup);
175 }
176
177 pointer operator &() const
178 {
179 return etl::addressof(*(*ilookup));
180 }
181
182 pointer operator ->() const
183 {
184 return etl::addressof(*(*ilookup));
185 }
186
187 friend bool operator == (const iterator& lhs, const iterator& rhs)
188 {
189 return lhs.ilookup == rhs.ilookup;
190 }
191
192 friend bool operator != (const iterator& lhs, const iterator& rhs)
193 {
194 return !(lhs == rhs);
195 }
196
197 private:
198
199 typename lookup_t::iterator ilookup;
200 };
201
202 //*************************************************************************
203 class const_iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, const value_type>
204 {
205 public:
206
207 friend class ireference_flat_multiset;
208
210 {
211 }
212
213 const_iterator(typename lookup_t::const_iterator ilookup_)
214 : ilookup(ilookup_)
215 {
216 }
217
219 : ilookup(other.ilookup)
220 {
221 }
222
224 : ilookup(other.ilookup)
225 {
226 }
227
229 {
230 ilookup = other.ilookup;
231 return *this;
232 }
233
235 {
236 ilookup = other.ilookup;
237 return *this;
238 }
239
241 {
242 ++ilookup;
243 return *this;
244 }
245
247 {
248 const_iterator temp(*this);
249 ++ilookup;
250 return temp;
251 }
252
254 {
255 --ilookup;
256 return *this;
257 }
258
260 {
261 const_iterator temp(*this);
262 --ilookup;
263 return temp;
264 }
265
267 {
268 return *(*ilookup);
269 }
270
272 {
273 return etl::addressof(*(*ilookup));
274 }
275
277 {
278 return etl::addressof(*(*ilookup));
279 }
280
281 friend bool operator == (const const_iterator& lhs, const const_iterator& rhs)
282 {
283 return lhs.ilookup == rhs.ilookup;
284 }
285
286 friend bool operator != (const const_iterator& lhs, const const_iterator& rhs)
287 {
288 return !(lhs == rhs);
289 }
290
291 private:
292
293 typename lookup_t::const_iterator ilookup;
294 };
295
296 protected:
297
298 typedef typename etl::parameter_type<T>::type parameter_t;
299
300 public:
301
302 typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
303 typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
304 typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
305
306 //*********************************************************************
309 //*********************************************************************
311 {
312 return iterator(lookup.begin());
313 }
314
315 //*********************************************************************
318 //*********************************************************************
320 {
321 return const_iterator(lookup.begin());
322 }
323
324 //*********************************************************************
327 //*********************************************************************
329 {
330 return iterator(lookup.end());
331 }
332
333 //*********************************************************************
336 //*********************************************************************
338 {
339 return const_iterator(lookup.end());
340 }
341
342 //*********************************************************************
345 //*********************************************************************
347 {
348 return const_iterator(lookup.cbegin());
349 }
350
351 //*********************************************************************
354 //*********************************************************************
356 {
357 return const_iterator(lookup.cend());
358 }
359
360 //*********************************************************************
363 //*********************************************************************
364 reverse_iterator rbegin()
365 {
366 return reverse_iterator(lookup.rbegin());
367 }
368
369 //*********************************************************************
372 //*********************************************************************
373 const_reverse_iterator rbegin() const
374 {
375 return const_reverse_iterator(lookup.rbegin());
376 }
377
378 //*********************************************************************
381 //*********************************************************************
382 reverse_iterator rend()
383 {
384 return reverse_iterator(lookup.rend());
385 }
386
387 //*********************************************************************
390 //*********************************************************************
391 const_reverse_iterator rend() const
392 {
393 return const_reverse_iterator(lookup.rend());
394 }
395
396 //*********************************************************************
399 //*********************************************************************
400 const_reverse_iterator crbegin() const
401 {
402 return const_reverse_iterator(lookup.crbegin());
403 }
404
405 //*********************************************************************
408 //*********************************************************************
409 const_reverse_iterator crend() const
410 {
411 return const_reverse_iterator(lookup.crend());
412 }
413
414 //*********************************************************************
420 //*********************************************************************
421 template <typename TIterator>
422 void assign(TIterator first, TIterator last)
423 {
424#if ETL_IS_DEBUG_BUILD
425 difference_type d = etl::distance(first, last);
426 ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
427#endif
428
429 clear();
430
431 while (first != last)
432 {
433 insert(*first);
434 ++first;
435 }
436 }
437
438 //*********************************************************************
442 //*********************************************************************
443 ETL_OR_STD::pair<iterator, bool> insert(value_type& value)
444 {
445 ETL_OR_STD::pair<iterator, bool> result(end(), false);
446
447 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
448
449 iterator i_element = etl::upper_bound(begin(), end(), value, compare);
450
451 if (i_element == end())
452 {
453 // At the end. Doesn't exist.
454 lookup.push_back(&value);
455 result.first = --end();
456 result.second = true;
457 }
458 else
459 {
460 // Not at the end.
461 lookup.insert(i_element.ilookup, &value);
462 result.first = i_element;
463 result.second = true;
464 }
465
466 return result;
467 }
468
469 //*********************************************************************
474 //*********************************************************************
475 iterator insert(const_iterator /*position*/, value_type& value)
476 {
477 return insert(value).first;
478 }
479
480 //*********************************************************************
486 //*********************************************************************
487 template <class TIterator>
488 void insert(TIterator first, TIterator last)
489 {
490 while (first != last)
491 {
492 insert(*first);
493 ++first;
494 }
495 }
496
497 //*********************************************************************
501 //*********************************************************************
502 size_t erase(parameter_t key)
503 {
504 ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
505
506 if (range.first == end())
507 {
508 return 0;
509 }
510 else
511 {
512 size_t d = etl::distance(range.first, range.second);
513 erase(range.first, range.second);
514 return d;
515 }
516 }
517
518 //*********************************************************************
519#if ETL_USING_CPP11
521 size_t erase(K&& key)
522 {
523 ETL_OR_STD::pair<iterator, iterator> range = equal_range(etl::forward<K>(key));
524
525 if (range.first == end())
526 {
527 return 0;
528 }
529 else
530 {
531 size_t d = etl::distance(range.first, range.second);
532 erase(range.first, range.second);
533 return d;
534 }
535 }
536#endif
537
538 //*********************************************************************
541 //*********************************************************************
543 {
544 return lookup.erase(i_element.ilookup);
545 }
546
547 //*********************************************************************
550 //*********************************************************************
552 {
553 return lookup.erase(i_element.ilookup);
554 }
555
556 //*********************************************************************
562 //*********************************************************************
564 {
565 return lookup.erase(first.ilookup, last.ilookup);
566 }
567
568 //*************************************************************************
570 //*************************************************************************
571 void clear()
572 {
573 lookup.clear();
574 }
575
576 //*********************************************************************
580 //*********************************************************************
581 iterator find(parameter_t key)
582 {
583 iterator itr = etl::lower_bound(begin(), end(), key, compare);
584
585 if (itr != end())
586 {
587 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
588 {
589 return itr;
590 }
591 else
592 {
593 return end();
594 }
595 }
596
597 return end();
598 }
599
600#if ETL_USING_CPP11
601 //*********************************************************************
603 iterator find(const K& key)
604 {
605 iterator itr = etl::lower_bound(begin(), end(), key, compare);
606
607 if (itr != end())
608 {
609 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
610 {
611 return itr;
612 }
613 else
614 {
615 return end();
616 }
617 }
618
619 return end();
620 }
621#endif
622
623 //*********************************************************************
627 //*********************************************************************
628 const_iterator find(parameter_t key) const
629 {
630 const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
631
632 if (itr != end())
633 {
634 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
635 {
636 return itr;
637 }
638 else
639 {
640 return end();
641 }
642 }
643
644 return end();
645 }
646
647#if ETL_USING_CPP11
648 //*********************************************************************
650 const_iterator find(const K& key) const
651 {
652 const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
653
654 if (itr != end())
655 {
656 if (!key_compare()(*itr, key) && !key_compare()(key, *itr))
657 {
658 return itr;
659 }
660 else
661 {
662 return end();
663 }
664 }
665
666 return end();
667 }
668#endif
669
670 //*********************************************************************
674 //*********************************************************************
675 size_t count(parameter_t key) const
676 {
677 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
678
679 return etl::distance(range.first, range.second);
680 }
681
682#if ETL_USING_CPP11
683 //*********************************************************************
685 size_t count(const K& key) const
686 {
687 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
688
689 return etl::distance(range.first, range.second);
690 }
691#endif
692
693 //*********************************************************************
697 //*********************************************************************
698 iterator lower_bound(parameter_t key)
699 {
700 return etl::lower_bound(begin(), end(), key, compare);
701 }
702
703#if ETL_USING_CPP11
704 //*********************************************************************
706 iterator lower_bound(const K& key)
707 {
708 return etl::lower_bound(begin(), end(), key, compare);
709 }
710#endif
711
712 //*********************************************************************
716 //*********************************************************************
717 const_iterator lower_bound(parameter_t key) const
718 {
719 return etl::lower_bound(cbegin(), cend(), key, compare);
720 }
721
722#if ETL_USING_CPP11
723 //*********************************************************************
725 const_iterator lower_bound(const K& key) const
726 {
727 return etl::lower_bound(cbegin(), cend(), key, compare);
728 }
729#endif
730
731 //*********************************************************************
735 //*********************************************************************
736 iterator upper_bound(parameter_t key)
737 {
738 return etl::upper_bound(begin(), end(), key, compare);
739 }
740
741#if ETL_USING_CPP11
742 //*********************************************************************
744 iterator upper_bound(const K& key)
745 {
746 return etl::upper_bound(begin(), end(), key, compare);
747 }
748#endif
749
750 //*********************************************************************
754 //*********************************************************************
755 const_iterator upper_bound(parameter_t key) const
756 {
757 return etl::upper_bound(cbegin(), cend(), key, compare);
758 }
759
760#if ETL_USING_CPP11
761 //*********************************************************************
763 const_iterator upper_bound(const K& key) const
764 {
765 return etl::upper_bound(cbegin(), cend(), key, compare);
766 }
767#endif
768
769 //*********************************************************************
773 //*********************************************************************
774 ETL_OR_STD::pair<iterator, iterator> equal_range(parameter_t key)
775 {
776 return etl::equal_range(begin(), end(), key, compare);
777 }
778
779#if ETL_USING_CPP11
780 //*********************************************************************
782 ETL_OR_STD::pair<iterator, iterator> equal_range(const K& key)
783 {
784 return etl::equal_range(begin(), end(), key, compare);
785 }
786#endif
787
788 //*************************************************************************
790 //*************************************************************************
791 bool contains(parameter_t key) const
792 {
793 return find(key) != end();
794 }
795
796#if ETL_USING_CPP11
797 //*************************************************************************
799 bool contains(const K& k) const
800 {
801 return find(k) != end();
802 }
803#endif
804
805 //*********************************************************************
809 //*********************************************************************
810 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
811 {
812 return etl::equal_range(begin(), end(), key, compare);
813 }
814
815 //*************************************************************************
818 //*************************************************************************
820 {
821 return lookup.size();
822 }
823
824 //*************************************************************************
827 //*************************************************************************
828 bool empty() const
829 {
830 return lookup.empty();
831 }
832
833 //*************************************************************************
836 //*************************************************************************
837 bool full() const
838 {
839 return lookup.full();
840 }
841
842 //*************************************************************************
845 //*************************************************************************
847 {
848 return lookup.capacity();
849 }
850
851 //*************************************************************************
854 //*************************************************************************
856 {
857 return lookup.max_size();
858 }
859
860 //*************************************************************************
863 //*************************************************************************
864 size_t available() const
865 {
866 return lookup.available();
867 }
868
869 protected:
870
871 //*********************************************************************
873 //*********************************************************************
878
879 //*********************************************************************
883 //*********************************************************************
884 ETL_OR_STD::pair<iterator, bool> insert_at(iterator i_element, reference value)
885 {
886 ETL_OR_STD::pair<iterator, bool> result(end(), false);
887
888 if (i_element == end())
889 {
890 // At the end.
891 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
892
893 lookup.push_back(&value);
894 result.first = --end();
895 result.second = true;
896 }
897 else
898 {
899 // Not at the end.
900 result.first = i_element;
901
902 // A new one.
903 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
904 lookup.insert(i_element.ilookup, &value);
905 result.second = true;
906 }
907
908 return result;
909 }
910
911 private:
912
913 // Disable copy construction.
916
917 lookup_t& lookup;
918
920
921 //*************************************************************************
923 //*************************************************************************
924#if defined(ETL_POLYMORPHIC_REFERENCE_FLAT_MULTISET) || defined(ETL_POLYMORPHIC_CONTAINERS)
925 public:
927 {
928 }
929#else
930 protected:
934#endif
935 };
936
937 //***************************************************************************
940 //***************************************************************************
941 template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etl::less<TKey> >
942 class reference_flat_multiset : public ireference_flat_multiset<TKey, TKeyCompare>
943 {
944 public:
945
946 static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
947
949
950 //*************************************************************************
952 //*************************************************************************
957
958 //*************************************************************************
960 //*************************************************************************
966
967 //*************************************************************************
972 //*************************************************************************
973 template <typename TIterator>
979
980 //*************************************************************************
982 //*************************************************************************
987
988 private:
989
990 // The vector that stores pointers to the nodes.
992 };
993
994 template <typename TKey, const size_t MAX_SIZE_, typename TCompare>
995 ETL_CONSTANT size_t reference_flat_multiset<TKey, MAX_SIZE_, TCompare>::MAX_SIZE;
996
997 //*************************************************************************
999 //*************************************************************************
1000#if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST
1001 template <typename... T>
1002 reference_flat_multiset(T...)->reference_flat_multiset<etl::nth_type_t<0, T...>, sizeof...(T)>;
1003#endif
1004
1005 //*************************************************************************
1007 //*************************************************************************
1008#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
1009 template <typename TKey, typename TKeyCompare = etl::less<TKey>, typename... T>
1010 constexpr auto make_reference_flat_multiset(T&&... keys) -> etl::reference_flat_multiset<TKey, sizeof...(T), TKeyCompare>
1011 {
1012 return { etl::forward<T>(keys)... };
1013 }
1014#endif
1015
1016 //***************************************************************************
1022 //***************************************************************************
1023 template <typename T, typename TKeyCompare>
1025 {
1026 return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
1027 }
1028
1029 //***************************************************************************
1035 //***************************************************************************
1036 template <typename T, typename TKeyCompare>
1041}
1042
1043#endif
Definition reference_flat_multiset.h:57
Definition reference_flat_multiset.h:71
Definition reference_flat_multiset.h:85
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
iterator erase(const_iterator first, const_iterator last)
Definition reference_flat_multiset.h:563
iterator erase(iterator i_element)
Definition reference_flat_multiset.h:542
iterator erase(const_iterator i_element)
Definition reference_flat_multiset.h:551
size_t count(parameter_t key) const
Definition reference_flat_multiset.h:675
const_iterator begin() const
Definition reference_flat_multiset.h:319
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
const_iterator find(parameter_t key) const
Definition reference_flat_multiset.h:628
~ireference_flat_multiset()
Destructor.
Definition reference_flat_multiset.h:931
const_iterator upper_bound(parameter_t key) const
Definition reference_flat_multiset.h:755
ireference_flat_multiset(lookup_t &lookup_)
Constructor.
Definition reference_flat_multiset.h:874
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(parameter_t key) const
Definition reference_flat_multiset.h:810
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
const_iterator end() const
Definition reference_flat_multiset.h:337
reverse_iterator rend()
Definition reference_flat_multiset.h:382
iterator insert(const_iterator, value_type &value)
Definition reference_flat_multiset.h:475
ETL_OR_STD::pair< iterator, bool > insert(value_type &value)
Definition reference_flat_multiset.h:443
size_t available() const
Definition reference_flat_multiset.h:864
void insert(TIterator first, TIterator last)
Definition reference_flat_multiset.h:488
iterator find(parameter_t key)
Definition reference_flat_multiset.h:581
size_type size() const
Definition reference_flat_multiset.h:819
const_iterator lower_bound(parameter_t key) const
Definition reference_flat_multiset.h:717
bool contains(parameter_t key) const
Check if the map contains the key.
Definition reference_flat_multiset.h:791
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
const_reverse_iterator rbegin() const
Definition reference_flat_multiset.h:373
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
const_reverse_iterator rend() const
Definition reference_flat_multiset.h:391
size_type max_size() const
Definition reference_flat_multiset.h:855
void assign(TIterator first, TIterator last)
Definition reference_flat_multiset.h:422
const_iterator cbegin() const
Definition reference_flat_multiset.h:346
Definition reference_flat_multiset.h:943
reference_flat_multiset(const reference_flat_multiset &other)
Copy constructor.
Definition reference_flat_multiset.h:961
~reference_flat_multiset()
Destructor.
Definition reference_flat_multiset.h:983
reference_flat_multiset()
Constructor.
Definition reference_flat_multiset.h:953
reference_flat_multiset(TIterator first, TIterator last)
Definition reference_flat_multiset.h:974
ETL_CONSTEXPR14 bool operator==(const etl::expected< TValue, TError > &lhs, const etl::expected< TValue2, TError2 > &rhs)
Equivalence operators.
Definition expected.h:968
#define ETL_ASSERT(b, e)
Definition error_handler.h:356
Definition exception.h:47
ETL_CONSTEXPR17 etl::enable_if<!etl::is_same< T, etl::nullptr_t >::value, T >::type * addressof(T &t)
Definition addressof.h:52
iterator begin()
Definition vector.h:100
size_type max_size() const
Definition vector_base.h:140
void push_back(const_reference value)
Definition vector.h:435
const_reverse_iterator crbegin() const
Definition vector.h:190
reverse_iterator rend()
Definition vector.h:172
size_type capacity() const
Definition vector_base.h:131
const_iterator cend() const
Definition vector.h:145
void clear()
Clears the vector.
Definition vector.h:417
iterator end()
Definition vector.h:118
const_reverse_iterator crend() const
Definition vector.h:199
const_iterator cbegin() const
Definition vector.h:136
bool full() const
Definition vector.h:996
size_type size() const
Definition vector.h:978
iterator erase(iterator i_element)
Definition vector.h:884
bool empty() const
Definition vector.h:987
size_t available() const
Definition vector.h:1005
reverse_iterator rbegin()
Definition vector.h:154
iterator insert(const_iterator position, const_reference value)
Definition vector.h:579
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
iterator
Definition iterator.h:399
pair holds two objects of arbitrary type
Definition utility.h:164
T1 first
first is a copy of the first object
Definition utility.h:168
T2 second
second is a copy of the second object
Definition utility.h:169
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:48