Embedded Template Library 1.0
Loading...
Searching...
No Matches
const_map.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) 2025 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_CONST_MAP_INCLUDED
32#define ETL_CONST_MAP_INCLUDED
33
34#include "platform.h"
35
36#if ETL_NOT_USING_CPP11
37 #error NOT SUPPORTED FOR C++03 OR BELOW
38#endif
39
40#include "algorithm.h"
41#include "type_traits.h"
42#include "functional.h"
43#include "nth_type.h"
44#include "span.h"
45
47
50
51namespace etl
52{
53 template <typename TKey, typename TMapped, typename TKeyCompare>
55 {
56 public:
57
58 using key_type = TKey;
59 using value_type = ETL_OR_STD::pair<const TKey, TMapped>;
60 using mapped_type = TMapped ;
61 using key_compare = TKeyCompare;
62 using const_reference = const value_type&;
63 using const_pointer = const value_type*;
64 using const_iterator = const value_type*;
65 using size_type = size_t;
66
67 //*********************************************************************
69 //*********************************************************************
71 {
72 public:
73
74 // Compare two value types.
75 ETL_CONSTEXPR14 bool operator ()(const value_type& element1, const value_type& element2) const ETL_NOEXCEPT
76 {
77 return kcompare(element1.first, element2.first);
78 }
79
80 // Compare value type and key.
81 ETL_CONSTEXPR14 bool operator ()(const value_type& element, const key_type& key) const ETL_NOEXCEPT
82 {
83 return kcompare(element.first, key);
84 }
85
86 // Compare value types and key.
87 // Enabled for transparent comparators.
88 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
89 ETL_CONSTEXPR14 bool operator ()(const value_type& element, const K& key) const ETL_NOEXCEPT
90 {
91 return kcompare(element.first, key);
92 }
93
94 // Compare key and value type.
95 ETL_CONSTEXPR14 bool operator ()(const key_type& key, const value_type& element) const ETL_NOEXCEPT
96 {
97 return kcompare(key, element.first);
98 }
99
100 // Compare key and value type.
101 // Enabled for transparent comparators.
102 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
103 ETL_CONSTEXPR14 bool operator ()(const K& key, const value_type& element) const ETL_NOEXCEPT
104 {
105 return kcompare(key, element.first);
106 }
107
108 key_compare kcompare;
109 };
110
111 //*************************************************************************
115 //*************************************************************************
116 ETL_CONSTEXPR14 bool is_valid() const ETL_NOEXCEPT
117 {
118 return etl::is_unique_sorted(begin(), end(), vcompare);
119 }
120
121 //*************************************************************************
123 //*************************************************************************
124 ETL_CONSTEXPR14 const_iterator begin() const ETL_NOEXCEPT
125 {
126 return element_list;
127 }
128
129 //*************************************************************************
131 //*************************************************************************
132 ETL_CONSTEXPR14 const_iterator cbegin() const ETL_NOEXCEPT
133 {
134 return element_list;
135 }
136
137 //*************************************************************************
139 //*************************************************************************
140 ETL_CONSTEXPR14 const_iterator end() const ETL_NOEXCEPT
141 {
142 return element_list_end;
143 }
144
145 //*************************************************************************
147 //*************************************************************************
148 ETL_CONSTEXPR14 const_iterator cend() const ETL_NOEXCEPT
149 {
150 return element_list_end;
151 }
152
153 //*************************************************************************
155 //*************************************************************************
156 ETL_CONSTEXPR14 const_pointer data() const ETL_NOEXCEPT
157 {
158 return element_list;
159 }
160
161 //*************************************************************************
166 //*************************************************************************
167 ETL_CONSTEXPR14 const mapped_type& operator[](const key_type& key) const ETL_NOEXCEPT
168 {
169 const_iterator itr = find(key);
170
171 return itr->second;
172 }
173
174 //*************************************************************************
180 //*************************************************************************
181 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
182 ETL_CONSTEXPR14 const mapped_type& operator[](const K& key) const ETL_NOEXCEPT
183 {
184 const_iterator itr = find(key);
185
186 return itr->second;
187 }
188
189 //*************************************************************************
194 //*************************************************************************
195 ETL_CONSTEXPR14 const mapped_type& at(const key_type& key) const ETL_NOEXCEPT
196 {
197 const_iterator itr = find(key);
198
199 return itr->second;
200 }
201
202 //*************************************************************************
208 //*************************************************************************
209 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
210 ETL_CONSTEXPR14 const mapped_type& at(const K& key) const ETL_NOEXCEPT
211 {
212 const_iterator itr = find(key);
213
214 return itr->second;
215 }
216
217 //*************************************************************************
222 //*************************************************************************
223 ETL_CONSTEXPR14 const_iterator find(const key_type& key) const ETL_NOEXCEPT
224 {
225 const_iterator itr = lower_bound(key);
226
227 if ((itr != end()) && (keys_are_equal(itr->first, key)))
228 {
229 return itr;
230 }
231
232 return end();
233 }
234
235 //*************************************************************************
241 //*************************************************************************
242 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
243 ETL_CONSTEXPR14 const_iterator find(const K& key) const ETL_NOEXCEPT
244 {
245 const_iterator itr = lower_bound(key);
246
247 if ((itr != end()) && (keys_are_equal(itr->first, key)))
248 {
249 return itr;
250 }
251
252 return end();
253 }
254
255 //*************************************************************************
259 //*************************************************************************
260 ETL_CONSTEXPR14 bool contains(const key_type& key) const ETL_NOEXCEPT
261 {
262 return find(key) != end();
263 }
264
265 //*************************************************************************
270 //*************************************************************************
271 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
272 ETL_CONSTEXPR14 bool contains(const K& key) const ETL_NOEXCEPT
273 {
274 return find(key) != end();
275 }
276
277 //*************************************************************************
281 //*************************************************************************
282 ETL_CONSTEXPR14 size_type count(const key_type& key) const ETL_NOEXCEPT
283 {
284 return contains(key) ? 1 : 0;
285 }
286
287 //*************************************************************************
292 //*************************************************************************
293 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
294 ETL_CONSTEXPR14 size_type count(const K& key) const ETL_NOEXCEPT
295 {
296 return contains(key) ? 1 : 0;
297 }
298
299 //*************************************************************************
306 //*************************************************************************
307 ETL_CONSTEXPR14 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const key_type& key) const ETL_NOEXCEPT
308 {
309 return etl::equal_range(begin(), end(), key, vcompare);
310 }
311
312 //*************************************************************************
320 //*************************************************************************
321 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
322 ETL_CONSTEXPR14 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const K& key) const ETL_NOEXCEPT
323 {
324 return etl::equal_range(begin(), end(), key, vcompare);
325 }
326
327 //*************************************************************************
332 //*************************************************************************
333 ETL_CONSTEXPR14 const_iterator lower_bound(const key_type& key) const ETL_NOEXCEPT
334 {
335 return etl::lower_bound(begin(), end(), key, vcompare);
336 }
337
338 //*************************************************************************
344 //*************************************************************************
345 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
346 ETL_CONSTEXPR14 const_iterator lower_bound(const K& key) const ETL_NOEXCEPT
347 {
348 return etl::lower_bound(begin(), end(), key, vcompare);
349 }
350
351 //*************************************************************************
356 //*************************************************************************
357 ETL_CONSTEXPR14 const_iterator upper_bound(const key_type& key) const ETL_NOEXCEPT
358 {
359 return etl::upper_bound(begin(), end(), key, vcompare);
360 }
361
362 //*************************************************************************
368 //*************************************************************************
369 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
370 ETL_CONSTEXPR14 const_iterator upper_bound(const K& key) const ETL_NOEXCEPT
371 {
372 return etl::upper_bound(begin(), end(), key, vcompare);
373 }
374
375 //*************************************************************************
378 //*************************************************************************
379 ETL_CONSTEXPR14 size_type empty() const ETL_NOEXCEPT
380 {
381 return size() == 0U;
382 }
383
384 //*************************************************************************
387 //*************************************************************************
388 ETL_CONSTEXPR14 size_type full() const ETL_NOEXCEPT
389 {
390 return (max_elements != 0) && (size() == max_elements);
391 }
392
393 //*************************************************************************
396 //*************************************************************************
397 ETL_CONSTEXPR14 size_type size() const ETL_NOEXCEPT
398 {
399 return size_type(element_list_end - element_list);
400 }
401
402 //*************************************************************************
405 //*************************************************************************
406 ETL_CONSTEXPR14 size_type max_size() const ETL_NOEXCEPT
407 {
408 return max_elements;
409 }
410
411 //*************************************************************************
415 //*************************************************************************
416 ETL_CONSTEXPR14 size_type capacity() const ETL_NOEXCEPT
417 {
418 return max_elements;
419 }
420
421 //*************************************************************************
424 //*************************************************************************
425 ETL_CONSTEXPR14 key_compare key_comp() const ETL_NOEXCEPT
426 {
427 return vcompare.kcompare;
428 }
429
430 //*************************************************************************
433 //*************************************************************************
434 ETL_CONSTEXPR14 value_compare value_comp() const ETL_NOEXCEPT
435 {
436 return vcompare;
437 }
438
439 protected:
440
441 //*************************************************************************
443 //*************************************************************************
444 template <typename... TElements>
445 ETL_CONSTEXPR14 explicit iconst_map(const value_type* element_list_, size_type size_, size_type max_elements_) ETL_NOEXCEPT
446 : element_list(element_list_)
447 , element_list_end{element_list_ + size_}
448 , max_elements(max_elements_)
449 {
450 }
451
452 private:
453
454 //*********************************************************************
456 //*********************************************************************
457 ETL_CONSTEXPR14 bool keys_are_equal(const key_type& key1, const key_type& key2) const ETL_NOEXCEPT
458 {
459 return !key_compare()(key1, key2) && !key_compare()(key2, key1);
460 }
461
462 //*********************************************************************
465 //*********************************************************************
466 template <typename K1, typename K2, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
467 ETL_CONSTEXPR14 bool keys_are_equal(const K1& key1, const K2& key2) const ETL_NOEXCEPT
468 {
469 return !key_compare()(key1, key2) && !key_compare()(key2, key1);
470 }
471
472 value_compare vcompare;
473
474 const value_type* element_list;
475 const value_type* element_list_end;
476 size_type max_elements;
477 };
478
479 //*********************************************************************
481 //*********************************************************************
482 template <typename TKey, typename TMapped, size_t Size, typename TKeyCompare = etl::less<TKey>>
483 class const_map : public iconst_map<TKey, TMapped, TKeyCompare>
484 {
485 public:
486
488
489 using key_type = typename base_t::key_type;
490 using value_type = typename base_t::value_type;
491 using mapped_type = typename base_t::mapped_type ;
492 using key_compare = typename base_t::key_compare;
493 using const_reference = typename base_t::const_reference;
494 using const_pointer = typename base_t::const_pointer;
495 using const_iterator = typename base_t::const_iterator;
496 using size_type = typename base_t::size_type;
497
498 static_assert((etl::is_default_constructible<key_type>::value), "key_type must be default constructible");
499 static_assert((etl::is_default_constructible<mapped_type>::value), "mapped_type must be default constructible");
500
501 //*************************************************************************
505 //*************************************************************************
506 template <typename... TElements>
507 ETL_CONSTEXPR14 explicit const_map(TElements&&... elements) ETL_NOEXCEPT
508 : iconst_map<TKey, TMapped, TKeyCompare>(element_list, sizeof...(elements), Size)
509 , element_list{etl::forward<TElements>(elements)...}
510 {
511 static_assert((etl::are_all_same<value_type, etl::decay_t<TElements>...>::value), "All elements must be value_type");
512 static_assert(sizeof...(elements) <= Size, "Number of elements exceeds capacity");
513 }
514
515 private:
516
517 value_type element_list[Size];
518 };
519
520 //*************************************************************************
522 //*************************************************************************
523#if ETL_USING_CPP17
524 template <typename... TElements>
525 const_map(TElements...) -> const_map<typename etl::nth_type_t<0, TElements...>::first_type,
526 typename etl::nth_type_t<0, TElements...>::second_type,
527 sizeof...(TElements)>;
528#endif
529
530 //*********************************************************************
532 //*********************************************************************
533 template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey>>
534 class const_map_ext : public iconst_map<TKey, TMapped, TKeyCompare>
535 {
536 public:
537
539
540 using key_type = typename base_t::key_type;
541 using value_type = typename base_t::value_type;
542 using mapped_type = typename base_t::mapped_type ;
543 using key_compare = typename base_t::key_compare;
544 using const_reference = typename base_t::const_reference;
545 using const_pointer = typename base_t::const_pointer;
546 using const_iterator = typename base_t::const_iterator;
547 using size_type = typename base_t::size_type;
548
549 static_assert((etl::is_default_constructible<key_type>::value), "key_type must be default constructible");
550 static_assert((etl::is_default_constructible<mapped_type>::value), "mapped_type must be default constructible");
551
552 //*************************************************************************
554 //*************************************************************************
555 ETL_CONSTEXPR14 const_map_ext() ETL_NOEXCEPT
556 : iconst_map<TKey, TMapped, TKeyCompare>(nullptr, 0, 0)
557 {
558 }
559
560 //*************************************************************************
562 //*************************************************************************
563 template <size_type Size>
564 ETL_CONSTEXPR14 explicit const_map_ext(const etl::span<const value_type, Size>& sp) ETL_NOEXCEPT
565 : iconst_map<TKey, TMapped, TKeyCompare>(sp.data(), Size, Size)
566 {
567 }
568
569 //*************************************************************************
571 //*************************************************************************
572 template <size_type Size>
573 ETL_CONSTEXPR14 explicit const_map_ext(const value_type(&begin_)[Size]) ETL_NOEXCEPT
574 : iconst_map<TKey, TMapped, TKeyCompare>(begin_, Size, Size)
575 {
576 }
577 };
578
579 //*************************************************************************
581 //*************************************************************************
582#if ETL_USING_CPP17
583 template <typename TElements, size_t Size>
584 const_map_ext(const etl::span<TElements, Size>&) -> const_map_ext<typename TElements::first_type, typename TElements::second_type>;
585
586 template <typename TElements, size_t Size>
587 const_map_ext(const TElements(&)[Size]) -> const_map_ext<typename TElements::first_type, typename TElements::second_type>;
588#endif
589
590 //*************************************************************************
592 //*************************************************************************
593 template <typename TKey, typename TMapped, typename TKeyCompare>
595 const etl::iconst_map<TKey, TMapped, TKeyCompare>& rhs) ETL_NOEXCEPT
596 {
597 return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
598 }
599
600 //*************************************************************************
602 //*************************************************************************
603 template <typename TKey, typename TMapped, typename TKeyCompare>
605 const etl::iconst_map<TKey, TMapped, TKeyCompare>& rhs) ETL_NOEXCEPT
606 {
607 return !(lhs == rhs);
608 }
609
610 //*************************************************************************
612 //*************************************************************************
613 template <typename TKey, typename TMapped, typename TKeyCompare>
615 const etl::iconst_map<TKey, TMapped, TKeyCompare>& rhs) ETL_NOEXCEPT
616 {
617 return etl::lexicographical_compare(lhs.begin(), lhs.end(),
618 rhs.begin(), rhs.end(),
619 lhs.value_comp());
620 }
621
622 //*************************************************************************
624 //*************************************************************************
625 template <typename TKey, typename TMapped, typename TKeyCompare>
627 const etl::iconst_map<TKey, TMapped, TKeyCompare>& rhs) ETL_NOEXCEPT
628 {
629 return (rhs < lhs);
630 }
631
632 //*************************************************************************
634 //*************************************************************************
635 template <typename TKey, typename TMapped, typename TKeyCompare>
637 const etl::iconst_map<TKey, TMapped, TKeyCompare>& rhs) ETL_NOEXCEPT
638 {
639 return !(rhs < lhs);
640 }
641
642 //*************************************************************************
644 //*************************************************************************
645 template <typename TKey, typename TMapped, typename TKeyCompare>
647 const etl::iconst_map<TKey, TMapped, TKeyCompare>& rhs) ETL_NOEXCEPT
648 {
649 return !(lhs < rhs);
650 }
651}
652
653#endif
ETL_CONSTEXPR14 const_map_ext(const value_type(&begin_)[Size]) ETL_NOEXCEPT
Construct a const_map from an array.
Definition const_map.h:573
ETL_CONSTEXPR14 const_map_ext() ETL_NOEXCEPT
Default construct a const_map.
Definition const_map.h:555
ETL_CONSTEXPR14 const_map_ext(const etl::span< const value_type, Size > &sp) ETL_NOEXCEPT
Construct a const_map from a variadic list of elements.
Definition const_map.h:564
Map type designed for constexpr.
Definition const_map.h:484
ETL_CONSTEXPR14 const_map(TElements &&... elements) ETL_NOEXCEPT
Construct a const_map from a variadic list of elements. Static asserts if the elements are not of typ...
Definition const_map.h:507
How to compare elements and keys.
Definition const_map.h:71
Definition const_map.h:55
ETL_CONSTEXPR14 const mapped_type & operator[](const K &key) const ETL_NOEXCEPT
Key index operator. Enabled for transparent comparators.
Definition const_map.h:182
ETL_CONSTEXPR14 size_type full() const ETL_NOEXCEPT
Definition const_map.h:388
ETL_CONSTEXPR14 key_compare key_comp() const ETL_NOEXCEPT
Definition const_map.h:425
ETL_CONSTEXPR14 size_type count(const key_type &key) const ETL_NOEXCEPT
Counts the numbeer elements with key.
Definition const_map.h:282
ETL_CONSTEXPR14 const_iterator upper_bound(const key_type &key) const ETL_NOEXCEPT
Returns a const_iterator to the first element that is greater than the key. Returns a const_iterator ...
Definition const_map.h:357
ETL_CONSTEXPR14 size_type empty() const ETL_NOEXCEPT
Definition const_map.h:379
ETL_CONSTEXPR14 ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(const key_type &key) const ETL_NOEXCEPT
Returns a range containing all elements with the key. The range is defined by a pair of two iterators...
Definition const_map.h:307
ETL_CONSTEXPR14 const_iterator end() const ETL_NOEXCEPT
Returns a const_iterator to the end of the map.
Definition const_map.h:140
ETL_CONSTEXPR14 const_iterator upper_bound(const K &key) const ETL_NOEXCEPT
Returns a const_iterator to the first element that is greater than the key. Returns a const_iterator ...
Definition const_map.h:370
ETL_CONSTEXPR14 const mapped_type & operator[](const key_type &key) const ETL_NOEXCEPT
Index operator.
Definition const_map.h:167
ETL_CONSTEXPR14 const_iterator lower_bound(const K &key) const ETL_NOEXCEPT
Returns a const_iterator to the first element that is not less than the key. Returns a const_iterator...
Definition const_map.h:346
ETL_CONSTEXPR14 size_type max_size() const ETL_NOEXCEPT
Definition const_map.h:406
ETL_CONSTEXPR14 bool is_valid() const ETL_NOEXCEPT
Definition const_map.h:116
ETL_CONSTEXPR14 size_type size() const ETL_NOEXCEPT
Definition const_map.h:397
ETL_CONSTEXPR14 const_iterator find(const key_type &key) const ETL_NOEXCEPT
Gets a const_iterator to the mapped value at the key index.
Definition const_map.h:223
ETL_CONSTEXPR14 bool contains(const K &key) const ETL_NOEXCEPT
Checks if the map contains an element with key. Enabled if the comparator is transparent.
Definition const_map.h:272
ETL_CONSTEXPR14 iconst_map(const value_type *element_list_, size_type size_, size_type max_elements_) ETL_NOEXCEPT
Constructor.
Definition const_map.h:445
ETL_CONSTEXPR14 const_iterator cbegin() const ETL_NOEXCEPT
Returns a const_iterator to the beginning of the map.
Definition const_map.h:132
ETL_CONSTEXPR14 const_iterator cend() const ETL_NOEXCEPT
Returns a const_iterator to the end of the map.
Definition const_map.h:148
ETL_CONSTEXPR14 value_compare value_comp() const ETL_NOEXCEPT
Definition const_map.h:434
ETL_CONSTEXPR14 ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(const K &key) const ETL_NOEXCEPT
Returns a range containing all elements with the key. The range is defined by a pair of two iterators...
Definition const_map.h:322
ETL_CONSTEXPR14 bool contains(const key_type &key) const ETL_NOEXCEPT
Checks if the map contains an element with key.
Definition const_map.h:260
ETL_CONSTEXPR14 const_iterator lower_bound(const key_type &key) const ETL_NOEXCEPT
Returns a const_iterator to the first element that is not less than the key. Returns a const_iterator...
Definition const_map.h:333
ETL_CONSTEXPR14 const_pointer data() const ETL_NOEXCEPT
Returns a const_pointer to the beginning of the map.
Definition const_map.h:156
ETL_CONSTEXPR14 const_iterator find(const K &key) const ETL_NOEXCEPT
Gets a const_iterator to the mapped value at the key index. Enabled if the comparator is transparent.
Definition const_map.h:243
ETL_CONSTEXPR14 size_type count(const K &key) const ETL_NOEXCEPT
Counts the numbeer elements with key. Enabled if the comparator is transparent.
Definition const_map.h:294
ETL_CONSTEXPR14 const mapped_type & at(const key_type &key) const ETL_NOEXCEPT
Gets the mapped value at the key index.
Definition const_map.h:195
ETL_CONSTEXPR14 const_iterator begin() const ETL_NOEXCEPT
Returns a const_iterator to the beginning of the map.
Definition const_map.h:124
ETL_CONSTEXPR14 size_type capacity() const ETL_NOEXCEPT
Definition const_map.h:416
ETL_CONSTEXPR14 const mapped_type & at(const K &key) const ETL_NOEXCEPT
Gets the mapped value at the key index. Enabled if the comparator is transparent.
Definition const_map.h:210
Span - Fixed Extent.
Definition span.h:138
ETL_NODISCARD ETL_CONSTEXPR14 bool is_unique_sorted(TIterator begin, TIterator end)
Definition algorithm.h:1794
bitset_ext
Definition absolute.h:39
bool operator>(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1190
bool operator>=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1202
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1151
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1139
bool operator<(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1163
bool operator<=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:1178