diff --git a/include/stdx/utility.hpp b/include/stdx/utility.hpp index d2f9ad5..4e91509 100644 --- a/include/stdx/utility.hpp +++ b/include/stdx/utility.hpp @@ -31,8 +31,8 @@ template struct map_value_helper { }; template map_value_helper(T) -> map_value_helper; -template struct map_value_t { - constexpr static inline auto value = V; +template struct map_value_t { + constexpr static inline auto value = V.value; }; template struct type_map : Ts... {}; @@ -45,13 +45,12 @@ template struct type_pair { using value_type = V; }; template using tt_pair = type_pair; -template -using vt_pair = tt_pair, V>; +template +using vt_pair = tt_pair, V>; template -using tv_pair = tt_pair>; +using tv_pair = tt_pair>; template -using vv_pair = - tt_pair, detail::map_value_t>; +using vv_pair = tt_pair, detail::map_value_t>; template using type_map = shrink_t>; @@ -82,12 +81,11 @@ using reverse_type_lookup_t = template using value_lookup_t = - decltype(detail::lookup, Default>( - expand())); + decltype(detail::lookup, Default>(expand())); template using reverse_value_lookup_t = - decltype(detail::reverse_lookup, Default>( + decltype(detail::reverse_lookup, Default>( expand())); namespace detail { @@ -99,29 +97,29 @@ template constexpr static auto type_lookup_v = type_or_t(expand())), - detail::map_value_t>::value; + detail::map_value_t>::value; template constexpr static auto reverse_type_lookup_v = type_or_t(expand())), - detail::map_value_t>::value; + detail::map_value_t>::value; template constexpr static auto value_lookup_v = type_or_t, missing_t>( + decltype(detail::lookup, missing_t>( expand())), - detail::map_value_t>::value; + detail::map_value_t>::value; template constexpr static auto reverse_value_lookup_v = type_or_t, + decltype(detail::reverse_lookup, missing_t>(expand())), - detail::map_value_t>::value; + detail::map_value_t>::value; template [[nodiscard]] constexpr auto forward_like(U &&u) noexcept -> decltype(auto) {