Skip to content

Commit

Permalink
[EnumMap] Remove forwarding of each trait
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkaratarakis committed Jul 31, 2023
1 parent 1bdc08b commit 234880e
Showing 1 changed file with 4 additions and 34 deletions.
38 changes: 4 additions & 34 deletions include/fixed_containers/enum_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,21 +717,6 @@ class EnumMap : public enum_map_detail::EnumMapBase<K, V, CheckingType>
using Self = EnumMap<K, V, CheckingType>;
using Base = enum_map_detail::EnumMapBase<K, V, CheckingType>;

public:
using key_type = typename Base::key_type;
using mapped_type = typename Base::mapped_type;
using value_type = typename Base::value_type;
using reference = typename Base::reference;
using const_reference = typename Base::const_reference;
using pointer = typename Base::pointer;
using const_pointer = typename Base::const_pointer;
using const_iterator = typename Base::const_iterator;
using iterator = typename Base::iterator;
using const_reverse_iterator = typename Base::const_reverse_iterator;
using reverse_iterator = typename Base::reverse_iterator;
using size_type = typename Base::size_type;
using difference_type = typename Base::difference_type;

public:
using Builder = enum_map_detail::EnumMapBuilder<K, V, EnumMap<K, V, CheckingType>>;

Expand All @@ -751,7 +736,7 @@ class EnumMap : public enum_map_detail::EnumMapBase<K, V, CheckingType>

template <class EnumMapType = Self>
static constexpr EnumMapType create_with_all_entries(
std::initializer_list<value_type> pairs,
std::initializer_list<typename Base::value_type> pairs,
const std_transition::source_location& loc = std_transition::source_location::current())
{
return Base::template create_with_all_entries<EnumMapType>(pairs, loc);
Expand Down Expand Up @@ -792,7 +777,7 @@ class EnumMap : public enum_map_detail::EnumMapBase<K, V, CheckingType>
: Base(first, last)
{
}
constexpr EnumMap(std::initializer_list<value_type> list) noexcept
constexpr EnumMap(std::initializer_list<typename Base::value_type> list) noexcept
: Base(list)
{
}
Expand Down Expand Up @@ -893,21 +878,6 @@ class EnumMap<K, V, CheckingType> : public enum_map_detail::EnumMapBase<K, V, Ch
using Self = EnumMap<K, V, CheckingType>;
using Base = enum_map_detail::EnumMapBase<K, V, CheckingType>;

public:
using key_type = typename Base::key_type;
using mapped_type = typename Base::mapped_type;
using value_type = typename Base::value_type;
using reference = typename Base::reference;
using const_reference = typename Base::const_reference;
using pointer = typename Base::pointer;
using const_pointer = typename Base::const_pointer;
using const_iterator = typename Base::const_iterator;
using iterator = typename Base::iterator;
using const_reverse_iterator = typename Base::const_reverse_iterator;
using reverse_iterator = typename Base::reverse_iterator;
using size_type = typename Base::size_type;
using difference_type = typename Base::difference_type;

public:
using Builder = enum_map_detail::EnumMapBuilder<K, V, Self>;

Expand All @@ -927,7 +897,7 @@ class EnumMap<K, V, CheckingType> : public enum_map_detail::EnumMapBase<K, V, Ch

template <class EnumMapType = Self>
static constexpr EnumMapType create_with_all_entries(
std::initializer_list<value_type> pairs,
std::initializer_list<typename Base::value_type> pairs,
const std_transition::source_location& loc = std_transition::source_location::current())
{
return Base::template create_with_all_entries<EnumMapType>(pairs, loc);
Expand Down Expand Up @@ -967,7 +937,7 @@ class EnumMap<K, V, CheckingType> : public enum_map_detail::EnumMapBase<K, V, Ch
: Base(first, last)
{
}
constexpr EnumMap(std::initializer_list<value_type> list) noexcept
constexpr EnumMap(std::initializer_list<typename Base::value_type> list) noexcept
: Base(list)
{
}
Expand Down

0 comments on commit 234880e

Please sign in to comment.