Embedded Template Library  1.0
reference_flat_map.h
Go to the documentation of this file.
1 
3 /******************************************************************************
4 The MIT License(MIT)
5 
6 Embedded Template Library.
7 https://github.com/ETLCPP/etl
8 https://www.etlcpp.com
9 
10 Copyright(c) 2017 jwellbelove
11 
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files(the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions :
18 
19 The above copyright notice and this permission notice shall be included in all
20 copies or substantial portions of the Software.
21 
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
25 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 SOFTWARE.
29 ******************************************************************************/
30 
31 #ifndef ETL_REFERENCE_FLAT_MAP_INCLUDED
32 #define ETL_REFERENCE_FLAT_MAP_INCLUDED
33 
34 #include <stddef.h>
35 
36 #include "platform.h"
37 #include "vector.h"
38 #include "error_handler.h"
39 #include "debug_count.h"
40 #include "type_traits.h"
41 #include "parameter_type.h"
42 #include "exception.h"
43 #include "static_assert.h"
44 #include "iterator.h"
45 
46 #undef ETL_FILE
47 #define ETL_FILE "30"
48 
49 //*****************************************************************************
55 //*****************************************************************************
56 
57 namespace etl
58 {
59  //***************************************************************************
62  //***************************************************************************
64  {
65  public:
66 
67  flat_map_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
68  : exception(reason_, file_name_, line_number_)
69  {
70  }
71  };
72 
73  //***************************************************************************
76  //***************************************************************************
78  {
79  public:
80 
81  flat_map_full(string_type file_name_, numeric_type line_number_)
82  : flat_map_exception(ETL_ERROR_TEXT("flat_map: full", ETL_FILE"A"), file_name_, line_number_)
83  {
84  }
85  };
86 
87  //***************************************************************************
90  //***************************************************************************
92  {
93  public:
94 
95  flat_map_out_of_bounds(string_type file_name_, numeric_type line_number_)
96  : flat_map_exception(ETL_ERROR_TEXT("flat_map:bounds", ETL_FILE"B"), file_name_, line_number_)
97  {
98  }
99  };
100 
101  //***************************************************************************
105  //***************************************************************************
106  template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
108  {
109  public:
110 
111  typedef ETL_OR_STD::pair<const TKey, TMapped> value_type;
112 
113  protected:
114 
116 
117  public:
118 
119  typedef TKey key_type;
120  typedef TMapped mapped_type;
121  typedef TKeyCompare key_compare;
122  typedef value_type& reference;
123  typedef const value_type& const_reference;
124  typedef value_type* pointer;
125  typedef const value_type* const_pointer;
126  typedef size_t size_type;
127 
128  //*************************************************************************
129  class iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, value_type>
130  {
131  public:
132 
133  friend class ireference_flat_map;
134  friend class const_iterator;
135 
136  iterator()
137  {
138  }
139 
140  iterator(typename lookup_t::iterator ilookup_)
141  : ilookup(ilookup_)
142  {
143  }
144 
145  iterator(const iterator& other)
146  : ilookup(other.ilookup)
147  {
148  }
149 
150  iterator& operator =(const iterator& other)
151  {
152  ilookup = other.ilookup;
153  return *this;
154  }
155 
156  iterator& operator ++()
157  {
158  ++ilookup;
159  return *this;
160  }
161 
162  iterator operator ++(int)
163  {
164  iterator temp(*this);
165  ++ilookup;
166  return temp;
167  }
168 
169  iterator& operator --()
170  {
171  --ilookup;
172  return *this;
173  }
174 
175  iterator operator --(int)
176  {
177  iterator temp(*this);
178  --ilookup;
179  return temp;
180  }
181 
182  reference operator *()
183  {
184  return *(*ilookup);
185  }
186 
187  const_reference operator *() const
188  {
189  return *(*ilookup);
190  }
191 
192  pointer operator &()
193  {
194  return etl::addressof(*(*ilookup));
195  }
196 
197  const_pointer operator &() const
198  {
199  return &(*(*ilookup));
200  }
201 
202  pointer operator ->()
203  {
204  return etl::addressof(*(*ilookup));
205  }
206 
207  const_pointer operator ->() const
208  {
209  return etl::addressof(*(*ilookup));
210  }
211 
212  friend bool operator == (const iterator& lhs, const iterator& rhs)
213  {
214  return lhs.ilookup == rhs.ilookup;
215  }
216 
217  friend bool operator != (const iterator& lhs, const iterator& rhs)
218  {
219  return !(lhs == rhs);
220  }
221 
222  private:
223 
224  typename lookup_t::iterator ilookup;
225  };
226 
227  //*************************************************************************
228  class const_iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, const value_type>
229  {
230  public:
231 
232  friend class ireference_flat_map;
233 
235  {
236  }
237 
238  const_iterator(typename lookup_t::const_iterator ilookup_)
239  : ilookup(ilookup_)
240  {
241  }
242 
243  const_iterator(const typename ireference_flat_map::iterator& other)
244  : ilookup(other.ilookup)
245  {
246  }
247 
248  const_iterator(const const_iterator& other)
249  : ilookup(other.ilookup)
250  {
251  }
252 
253  const_iterator& operator =(const typename ireference_flat_map::iterator& other)
254  {
255  ilookup = other.ilookup;
256  return *this;
257  }
258 
259  const_iterator& operator =(const const_iterator& other)
260  {
261  ilookup = other.ilookup;
262  return *this;
263  }
264 
265  const_iterator& operator ++()
266  {
267  ++ilookup;
268  return *this;
269  }
270 
271  const_iterator operator ++(int)
272  {
273  const_iterator temp(*this);
274  ++ilookup;
275  return temp;
276  }
277 
278  const_iterator& operator --()
279  {
280  --ilookup;
281  return *this;
282  }
283 
284  const_iterator operator --(int)
285  {
286  const_iterator temp(*this);
287  --ilookup;
288  return temp;
289  }
290 
291  const_reference operator *() const
292  {
293  return *(*ilookup);
294  }
295 
296  const_pointer operator &() const
297  {
298  return etl::addressof(*(*ilookup));
299  }
300 
301  const_pointer operator ->() const
302  {
303  return etl::addressof(*(*ilookup));
304  }
305 
306  friend bool operator == (const const_iterator& lhs, const const_iterator& rhs)
307  {
308  return lhs.ilookup == rhs.ilookup;
309  }
310 
311  friend bool operator != (const const_iterator& lhs, const const_iterator& rhs)
312  {
313  return !(lhs == rhs);
314  }
315 
316  private:
317 
318  typename lookup_t::const_iterator ilookup;
319  };
320 
321  typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
322  typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
323  typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
324 
325  protected:
326 
327  typedef typename etl::parameter_type<TKey>::type key_parameter_t;
328 
329  private:
330 
331  //*********************************************************************
333  //*********************************************************************
334  class Compare
335  {
336  public:
337 
338  bool operator ()(const value_type& element, key_type key) const
339  {
340  return comp(element.first, key);
341  }
342 
343  bool operator ()(key_type key, const value_type& element) const
344  {
345  return comp(key, element.first);
346  }
347 
348  key_compare comp;
349  };
350 
351  public:
352 
353  //*********************************************************************
356  //*********************************************************************
358  {
359  return iterator(lookup.begin());
360  }
361 
362  //*********************************************************************
365  //*********************************************************************
367  {
368  return const_iterator(lookup.begin());
369  }
370 
371  //*********************************************************************
374  //*********************************************************************
376  {
377  return iterator(lookup.end());
378  }
379 
380  //*********************************************************************
383  //*********************************************************************
385  {
386  return const_iterator(lookup.end());
387  }
388 
389  //*********************************************************************
392  //*********************************************************************
394  {
395  return const_iterator(lookup.cbegin());
396  }
397 
398  //*********************************************************************
401  //*********************************************************************
403  {
404  return const_iterator(lookup.cend());
405  }
406 
407  //*********************************************************************
410  //*********************************************************************
411  reverse_iterator rbegin()
412  {
413  return reverse_iterator(lookup.rbegin());
414  }
415 
416  //*********************************************************************
419  //*********************************************************************
420  const_reverse_iterator rbegin() const
421  {
422  return reverse_iterator(lookup.rbegin());
423  }
424 
425  //*********************************************************************
428  //*********************************************************************
429  reverse_iterator rend()
430  {
431  return reverse_iterator(lookup.rend());
432  }
433 
434  //*********************************************************************
437  //*********************************************************************
438  const_reverse_iterator rend() const
439  {
440  return const_reverse_iterator(lookup.rend());
441  }
442 
443  //*********************************************************************
446  //*********************************************************************
447  const_reverse_iterator crbegin() const
448  {
449  return const_reverse_iterator(lookup.crbegin());
450  }
451 
452  //*********************************************************************
455  //*********************************************************************
456  const_reverse_iterator crend() const
457  {
458  return const_reverse_iterator(lookup.crend());
459  }
460 
461  //*********************************************************************
465  //*********************************************************************
466  mapped_type& operator [](key_parameter_t key)
467  {
468  iterator i_element = lower_bound(key);
469 
470  ETL_ASSERT((i_element != end()) && keys_are_equal(i_element->first, key), ETL_ERROR(flat_map_out_of_bounds));
471 
472  return i_element->second;
473  }
474 
475  //*********************************************************************
479  //*********************************************************************
480  const mapped_type& operator [](key_parameter_t key) const
481  {
482  iterator i_element = lower_bound(key);
483 
484  ETL_ASSERT((i_element != end()) && keys_are_equal(i_element->first, key), ETL_ERROR(flat_map_out_of_bounds));
485 
486  return i_element->second;
487  }
488 
489  //*********************************************************************
494  //*********************************************************************
495  mapped_type& at(key_parameter_t key)
496  {
497  iterator i_element = lower_bound(key);
498 
499  ETL_ASSERT((i_element != end()) && keys_are_equal(i_element->first, key), ETL_ERROR(flat_map_out_of_bounds));
500 
501  return i_element->second;
502  }
503 
504  //*********************************************************************
509  //*********************************************************************
510  const mapped_type& at(key_parameter_t key) const
511  {
512  const_iterator i_element = lower_bound(key);
513 
514  ETL_ASSERT((i_element != end()) && keys_are_equal(i_element->first, key), ETL_ERROR(flat_map_out_of_bounds));
515 
516  return i_element->second;
517  }
518 
519  //*********************************************************************
525  //*********************************************************************
526  template <typename TIterator>
527  void assign(TIterator first, TIterator last)
528  {
529  ETL_STATIC_ASSERT((etl::is_same<value_type, typename etl::iterator_traits<TIterator>::value_type>::value), "Incompatible data for assign");
530 
531 #if defined(ETL_DEBUG)
532  difference_type d = etl::distance(first, last);
533  ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_map_full));
534 #endif
535 
536  clear();
537 
538  while (first != last)
539  {
540  insert(*first++);
541  }
542  }
543 
544  //*********************************************************************
548  //*********************************************************************
549  ETL_OR_STD::pair<iterator, bool> insert(reference value)
550  {
551  iterator i_element = lower_bound(value.first);
552 
553  return insert_at(i_element, value);
554  }
555 
556  //*********************************************************************
561  //*********************************************************************
562  iterator insert(iterator position, reference value)
563  {
564  return insert(value).first;
565  }
566 
567  //*********************************************************************
573  //*********************************************************************
574  template <class TIterator>
575  void insert(TIterator first, TIterator last)
576  {
577  while (first != last)
578  {
579  insert(*first++);
580  }
581  }
582 
583  //*********************************************************************
587  //*********************************************************************
588  size_t erase(key_parameter_t key)
589  {
590  iterator i_element = find(key);
591 
592  if (i_element == end())
593  {
594  return 0U;
595  }
596  else
597  {
598  lookup.erase(i_element.ilookup);
599  return 1U;
600  }
601  }
602 
603  //*********************************************************************
606  //*********************************************************************
607  void erase(iterator i_element)
608  {
609  lookup.erase(i_element.ilookup);
610  }
611 
612  //*********************************************************************
618  //*********************************************************************
619  void erase(iterator first, iterator last)
620  {
621  lookup.erase(first.ilookup, last.ilookup);
622  }
623 
624  //*************************************************************************
626  //*************************************************************************
627  void clear()
628  {
629  lookup.clear();
630  }
631 
632  //*********************************************************************
636  //*********************************************************************
637  iterator find(key_parameter_t key)
638  {
639  iterator itr = lower_bound(key);
640 
641  if (itr != end())
642  {
643  if (keys_are_equal(itr->first, key))
644  {
645  return itr;
646  }
647  else
648  {
649  return end();
650  }
651  }
652 
653  return end();
654  }
655 
656  //*********************************************************************
660  //*********************************************************************
661  const_iterator find(key_parameter_t key) const
662  {
663  const_iterator itr = lower_bound(key);
664 
665  if (itr != end())
666  {
667  if (keys_are_equal(itr->first, key))
668  {
669  return itr;
670  }
671  else
672  {
673  return end();
674  }
675  }
676 
677  return end();
678  }
679 
680  //*********************************************************************
684  //*********************************************************************
685  size_t count(key_parameter_t key) const
686  {
687  return (find(key) == end()) ? 0U : 1U;
688  }
689 
690  //*********************************************************************
694  //*********************************************************************
695  iterator lower_bound(key_parameter_t key)
696  {
697  return etl::lower_bound(begin(), end(), key, compare);
698  }
699 
700  //*********************************************************************
704  //*********************************************************************
705  const_iterator lower_bound(key_parameter_t key) const
706  {
707  return etl::lower_bound(cbegin(), cend(), key, compare);
708  }
709 
710  //*********************************************************************
714  //*********************************************************************
715  iterator upper_bound(key_parameter_t key)
716  {
717  return etl::upper_bound(begin(), end(), key, compare);
718  }
719 
720  //*********************************************************************
724  //*********************************************************************
725  const_iterator upper_bound(key_parameter_t key) const
726  {
727  return etl::upper_bound(begin(), end(), key, compare);
728  }
729 
730  //*********************************************************************
734  //*********************************************************************
735  ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
736  {
737  iterator i_lower = etl::lower_bound(begin(), end(), key, compare);
738 
739  return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, end(), key, compare));
740  }
741 
742  //*********************************************************************
746  //*********************************************************************
747  ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
748  {
749  const_iterator i_lower = etl::lower_bound(cbegin(), cend(), key, compare);
750 
751  return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, cend(), key, compare));
752  }
753 
754  //*************************************************************************
757  //*************************************************************************
758  size_type size() const
759  {
760  return lookup.size();
761  }
762 
763  //*************************************************************************
766  //*************************************************************************
767  bool empty() const
768  {
769  return lookup.empty();
770  }
771 
772  //*************************************************************************
775  //*************************************************************************
776  bool full() const
777  {
778  return lookup.full();
779  }
780 
781  //*************************************************************************
784  //*************************************************************************
785  size_type capacity() const
786  {
787  return lookup.capacity();
788  }
789 
790  //*************************************************************************
793  //*************************************************************************
794  size_type max_size() const
795  {
796  return lookup.max_size();
797  }
798 
799  //*************************************************************************
802  //*************************************************************************
803  size_t available() const
804  {
805  return lookup.available();
806  }
807 
808  protected:
809 
810  //*********************************************************************
812  //*********************************************************************
814  : lookup(lookup_)
815  {
816  }
817 
818  //*********************************************************************
822  //*********************************************************************
823  ETL_OR_STD::pair<iterator, bool> insert_at(iterator i_element, value_type& value)
824  {
825  ETL_OR_STD::pair<iterator, bool> result(end(), false);
826 
827  if (i_element == end())
828  {
829  // At the end.
830  ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_map_full));
831 
832  lookup.push_back(&value);
833  result.first = --end();
834  result.second = true;
835  }
836  else
837  {
838  // Not at the end.
839  result.first = i_element;
840 
841  //Not an existing element?
842  if (!keys_are_equal(i_element->first, value.first))
843  {
844  // A new one.
845  ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_map_full));
846  lookup.insert(i_element.ilookup, &value);
847  result.second = true;
848  }
849  }
850 
851  return result;
852  }
853 
854  //*********************************************************************
856  //*********************************************************************
857  bool keys_are_equal(key_parameter_t key1, key_parameter_t key2) const
858  {
859  return !key_compare()(key1, key2) && !key_compare()(key2, key1);
860  }
861 
862  private:
863 
864  // Disable copy construction and assignment.
866  ireference_flat_map& operator = (const ireference_flat_map&);
867 
868  lookup_t& lookup;
869 
870  Compare compare;
871 
872  //*************************************************************************
874  //*************************************************************************
875 #if defined(ETL_POLYMORPHIC_REFERENCE_FLAT_MAP) || defined(ETL_POLYMORPHIC_CONTAINERS)
876  public:
877  virtual ~ireference_flat_map()
878  {
879  }
880 #else
881  protected:
883  {
884  }
885 #endif
886  };
887 
888  //***************************************************************************
894  //***************************************************************************
895  template <typename TKey, typename TMapped, typename TKeyCompare>
897  {
898  return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
899  }
900 
901  //***************************************************************************
907  //***************************************************************************
908  template <typename TKey, typename TMapped, typename TKeyCompare>
910  {
911  return !(lhs == rhs);
912  }
913 
914  //***************************************************************************
921  //***************************************************************************
922  template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
923  class reference_flat_map : public ireference_flat_map<TKey, TValue, TCompare>
924  {
925  public:
926 
927  static const size_t MAX_SIZE = MAX_SIZE_;
928 
929  //*************************************************************************
931  //*************************************************************************
933  : ireference_flat_map<TKey, TValue, TCompare>(lookup)
934  {
935  }
936 
937  //*************************************************************************
942  //*************************************************************************
943  template <typename TIterator>
944  reference_flat_map(TIterator first, TIterator last)
945  : ireference_flat_map<TKey, TValue, TCompare>(lookup)
946  {
948  }
949 
950  //*************************************************************************
952  //*************************************************************************
954  {
956  }
957 
958  //*************************************************************************
960  //*************************************************************************
962  {
963  if (&rhs != this)
964  {
966  }
967 
968  return *this;
969  }
970 
971  private:
972 
974 
975  typedef typename ireference_flat_map<TKey, TValue, TCompare>::value_type node_t;
976 
977  // The vector that stores pointers to the nodes.
979  };
980 
981 }
982 
983 #undef ETL_FILE
984 
985 #endif
Definition: reference_flat_map.h:229
Definition: reference_flat_map.h:130
bitset< MAXN > operator&(const bitset< MAXN > &lhs, const bitset< MAXN > &rhs)
Definition: bitset.h:1157
#define ETL_ASSERT(b, e)
Definition: error_handler.h:290
exception(string_type reason_, string_type file_, numeric_type line_)
Constructor.
Definition: exception.h:67
Definition: exception.h:47
T * addressof(T &t)
Definition: memory.h:61
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(key_parameter_t key) const
Definition: reference_flat_map.h:747
iterator begin()
Definition: reference_flat_map.h:357
void clear()
Clears the reference_flat_map.
Definition: reference_flat_map.h:627
const_reverse_iterator rbegin() const
Definition: reference_flat_map.h:420
~ireference_flat_map()
Destructor.
Definition: reference_flat_map.h:882
const_iterator lower_bound(key_parameter_t key) const
Definition: reference_flat_map.h:705
const_reverse_iterator crbegin() const
Definition: reference_flat_map.h:447
reverse_iterator rend()
Definition: reference_flat_map.h:429
reference_flat_map()
Constructor.
Definition: reference_flat_map.h:932
ETL_OR_STD::pair< iterator, iterator > equal_range(key_parameter_t key)
Definition: reference_flat_map.h:735
size_t count(key_parameter_t key) const
Definition: reference_flat_map.h:685
iterator insert(iterator position, reference value)
Definition: reference_flat_map.h:562
iterator end()
Definition: reference_flat_map.h:375
const mapped_type & at(key_parameter_t key) const
Definition: reference_flat_map.h:510
const_iterator cbegin() const
Definition: reference_flat_map.h:393
size_t available() const
Definition: reference_flat_map.h:803
ireference_flat_map(lookup_t &lookup_)
Constructor.
Definition: reference_flat_map.h:813
const_reverse_iterator crend() const
Definition: reference_flat_map.h:456
reference_flat_map & operator=(const reference_flat_map &rhs)
Assignment operator.
Definition: reference_flat_map.h:961
reference_flat_map(TIterator first, TIterator last)
Definition: reference_flat_map.h:944
size_type max_size() const
Definition: reference_flat_map.h:794
~reference_flat_map()
Destructor.
Definition: reference_flat_map.h:953
bool empty() const
Definition: reference_flat_map.h:767
ETL_OR_STD::pair< iterator, bool > insert(reference value)
Definition: reference_flat_map.h:549
const_iterator upper_bound(key_parameter_t key) const
Definition: reference_flat_map.h:725
const_iterator begin() const
Definition: reference_flat_map.h:366
iterator lower_bound(key_parameter_t key)
Definition: reference_flat_map.h:695
reverse_iterator rbegin()
Definition: reference_flat_map.h:411
iterator upper_bound(key_parameter_t key)
Definition: reference_flat_map.h:715
const_reverse_iterator rend() const
Definition: reference_flat_map.h:438
size_type size() const
Definition: reference_flat_map.h:758
iterator find(key_parameter_t key)
Definition: reference_flat_map.h:637
const_iterator cend() const
Definition: reference_flat_map.h:402
const_iterator find(key_parameter_t key) const
Definition: reference_flat_map.h:661
mapped_type & at(key_parameter_t key)
Definition: reference_flat_map.h:495
bool keys_are_equal(key_parameter_t key1, key_parameter_t key2) const
Check to see if the keys are equal.
Definition: reference_flat_map.h:857
size_t erase(key_parameter_t key)
Definition: reference_flat_map.h:588
void erase(iterator i_element)
Definition: reference_flat_map.h:607
bool full() const
Definition: reference_flat_map.h:776
mapped_type & operator[](key_parameter_t key)
Definition: reference_flat_map.h:466
ETL_OR_STD::pair< iterator, bool > insert_at(iterator i_element, value_type &value)
Definition: reference_flat_map.h:823
void assign(TIterator first, TIterator last)
Definition: reference_flat_map.h:527
size_type capacity() const
Definition: reference_flat_map.h:785
void erase(iterator first, iterator last)
Definition: reference_flat_map.h:619
const_iterator end() const
Definition: reference_flat_map.h:384
void insert(TIterator first, TIterator last)
Definition: reference_flat_map.h:575
Definition: reference_flat_map.h:64
Definition: reference_flat_map.h:78
Definition: reference_flat_map.h:92
Definition: reference_flat_map.h:108
Definition: reference_flat_map.h:924
bool operator==(const etl::ireference_flat_map< TKey, TMapped, TKeyCompare > &lhs, const etl::ireference_flat_map< TKey, TMapped, TKeyCompare > &rhs)
Definition: reference_flat_map.h:896
bool operator!=(const etl::ireference_flat_map< TKey, TMapped, TKeyCompare > &lhs, const etl::ireference_flat_map< TKey, TMapped, TKeyCompare > &rhs)
Definition: reference_flat_map.h:909
is_same
Definition: type_traits_generator.h:981
iterator begin()
Definition: vector.h:108
size_type max_size() const
Definition: vector_base.h:143
void push_back(const_reference value)
Definition: vector.h:408
const_reverse_iterator crbegin() const
Definition: vector.h:198
reverse_iterator rend()
Definition: vector.h:180
size_type capacity() const
Definition: vector_base.h:134
iterator insert(iterator position, const_reference value)
Definition: vector.h:531
const_iterator cend() const
Definition: vector.h:153
void clear()
Clears the vector.
Definition: vector.h:398
iterator end()
Definition: vector.h:126
const_reverse_iterator crend() const
Definition: vector.h:207
const_iterator cbegin() const
Definition: vector.h:144
bool full() const
Definition: vector.h:914
size_type size() const
Definition: vector.h:896
iterator erase(iterator i_element)
Definition: vector.h:820
bool empty() const
Definition: vector.h:905
size_t available() const
Definition: vector.h:923
reverse_iterator rbegin()
Definition: vector.h:162
Definition: vector.h:80
Definition: absolute.h:37
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:594
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:582
Definition: compare.h:52
iterator
Definition: iterator.h:422
etl::conditional< etl::is_fundamental< T >::value||etl::is_pointer< T >::value, T, const T & >::type type
By default fundamental and pointer types are passed by value.
Definition: parameter_type.h:48