Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::const_map_ext< TKey, TMapped, TKeyCompare > Class Template Reference

Template deduction guides. More...

#include <const_map.h>

Public Types

using base_t = iconst_map<TKey, TMapped, TKeyCompare>
using key_type = typename base_t::key_type
using value_type = typename base_t::value_type
using mapped_type = typename base_t::mapped_type
using key_compare = typename base_t::key_compare
using const_reference = typename base_t::const_reference
using const_pointer = typename base_t::const_pointer
using const_iterator = typename base_t::const_iterator
using size_type = typename base_t::size_type
Public Types inherited from etl::iconst_map< TKey, TMapped, TKeyCompare >
using key_type = TKey
using value_type = ETL_OR_STD::pair<const TKey, TMapped>
using mapped_type = TMapped
using key_compare = TKeyCompare
using const_reference = const value_type&
using const_pointer = const value_type*
using const_iterator = const value_type*
using size_type = size_t

Public Member Functions

ETL_CONSTEXPR14 const_map_ext () ETL_NOEXCEPT
 Default construct a const_map.
template<size_type Size>
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.
template<size_type Size>
ETL_CONSTEXPR14 const_map_ext (const value_type(&begin_)[Size]) ETL_NOEXCEPT
 Construct a const_map from an array.
Public Member Functions inherited from etl::iconst_map< TKey, TMapped, TKeyCompare >
ETL_CONSTEXPR14 bool is_valid () const ETL_NOEXCEPT
ETL_CONSTEXPR14 const_iterator begin () const ETL_NOEXCEPT
 Returns a const_iterator to the beginning of the map.
ETL_CONSTEXPR14 const_iterator cbegin () const ETL_NOEXCEPT
 Returns a const_iterator to the beginning of the map.
ETL_CONSTEXPR14 const_iterator end () const ETL_NOEXCEPT
 Returns a const_iterator to the end of the map.
ETL_CONSTEXPR14 const_iterator cend () const ETL_NOEXCEPT
 Returns a const_iterator to the end of the map.
ETL_CONSTEXPR14 const_pointer data () const ETL_NOEXCEPT
 Returns a const_pointer to the beginning of the map.
ETL_CONSTEXPR14 const mapped_type & operator[] (const key_type &key) const ETL_NOEXCEPT
 Index operator.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 const mapped_type & operator[] (const K &key) const ETL_NOEXCEPT
 Key index operator. Enabled for transparent comparators.
ETL_CONSTEXPR14 const mapped_type & at (const key_type &key) const ETL_NOEXCEPT
 Gets the mapped value at the key index.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
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.
ETL_CONSTEXPR14 const_iterator find (const key_type &key) const ETL_NOEXCEPT
 Gets a const_iterator to the mapped value at the key index.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
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.
ETL_CONSTEXPR14 bool contains (const key_type &key) const ETL_NOEXCEPT
 Checks if the map contains an element with key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
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.
ETL_CONSTEXPR14 size_type count (const key_type &key) const ETL_NOEXCEPT
 Counts the numbeer elements with key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
ETL_CONSTEXPR14 size_type count (const K &key) const ETL_NOEXCEPT
 Counts the numbeer elements with key. Enabled if the comparator is transparent.
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, one to the first element that is not less than the key and second to the first element greater than the key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
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, one to the first element that is not less than the key and second to the first element greater than the key. Enabled if the comparator is transparent.
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 to the first element that is not less than the key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
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 to the first element that is not less than the key. Enabled if the comparator is transparent.
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 to the first element that is greater than the key.
template<typename K, typename KC = TKeyCompare, etl::enable_if_t< comparator_is_transparent< KC >::value, int > = 0>
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 to the first element that is greater than the key. Enabled if the comparator is transparent.
ETL_CONSTEXPR14 size_type empty () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type full () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type size () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type max_size () const ETL_NOEXCEPT
ETL_CONSTEXPR14 size_type capacity () const ETL_NOEXCEPT
ETL_CONSTEXPR14 key_compare key_comp () const ETL_NOEXCEPT
ETL_CONSTEXPR14 value_compare value_comp () const ETL_NOEXCEPT

Additional Inherited Members

Protected Member Functions inherited from etl::iconst_map< TKey, TMapped, TKeyCompare >
template<typename... TElements>
ETL_CONSTEXPR14 iconst_map (const value_type *element_list_, size_type size_, size_type max_elements_) ETL_NOEXCEPT
 Constructor.

Detailed Description

template<typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey>>
class etl::const_map_ext< TKey, TMapped, TKeyCompare >

Template deduction guides.

Map type designed for constexpr.


The documentation for this class was generated from the following file: