18 template <
size_t Size,
typename...>
23 template <
size_t Size>
26 template <
typename InKey>
29 static constexpr size_t index = Size;
32 template <
size_t Index>
39 template <
size_t Size,
typename Key,
typename Value,
typename... Rest>
43 return Size - 1u -
sizeof...(Rest);
47 template <
typename InKey>
49 using type =
typename std::conditional<
50 std::is_same<InKey, Key>::value,
54 static constexpr size_t index =
55 std::is_same<InKey, Key>::value ?
61 template <
size_t Index>
63 using type =
typename std::conditional<
64 Index == current_index(),
69 using key =
typename std::conditional<
70 Index == current_index(),
89 template <
typename... Items>
92 static constexpr size_t size() {
93 return sizeof...(Items);
96 template <
typename InKey>
99 template <
size_t Index>
This file contains definitions of common data structures used in traffic manager.
A compile time structure for mapping two types.
typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get_by_index< Index > get_by_index
static constexpr size_t size()
typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get< InKey > get
static constexpr size_t current_index()
typename std::conditional< Index==current_index(), Key, typename CompileTimeTypeMapImpl< Size, Rest... >::template get_by_index< Index >::key >::type key
typename std::conditional< Index==current_index(), Value, typename CompileTimeTypeMapImpl< Size, Rest... >::template get_by_index< Index >::type >::type type
typename std::conditional< std::is_same< InKey, Key >::value, Value, typename CompileTimeTypeMapImpl< Size, Rest... >::template get< InKey >::type >::type type
Private implementation of the CompileTimeTypeMap.