{
using _Alternative = variant_alternative_t<__index, _Next>;
__element = __gen_vtable_impl<
- remove_reference_t<
- decltype(__element)>, tuple<_Variants...>,
- std::index_sequence<__indices..., __index>>::_S_apply();
+ remove_reference_t<decltype(__element)>, tuple<_Variants...>,
+ std::index_sequence<__indices..., __index>>::_S_apply();
}
};
using _Array_type =
_Multi_array<_Result_type (*)(_Visitor&&, _Variants...)>;
- decltype(auto)
- static constexpr __visit_invoke(_Visitor&& __visitor, _Variants... __vars)
+ static constexpr decltype(auto)
+ __visit_invoke(_Visitor&& __visitor, _Variants... __vars)
{
return std::__invoke(std::forward<_Visitor>(__visitor),
- std::get<__indices>(std::forward<_Variants>(__vars))...);
+ __variant::__get<__indices>(std::forward<_Variants>(__vars))...);
}
static constexpr auto
} // namespace __detail
template<typename _Tp, typename... _Types>
- inline constexpr bool holds_alternative(const variant<_Types...>& __v)
- noexcept
+ constexpr bool
+ holds_alternative(const variant<_Types...>& __v) noexcept
{
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
}
template<typename _Tp, typename... _Types>
- constexpr inline _Tp& get(variant<_Types...>& __v)
+ constexpr _Tp& get(variant<_Types...>& __v)
{
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
}
template<typename _Tp, typename... _Types>
- constexpr inline _Tp&& get(variant<_Types...>&& __v)
+ constexpr _Tp&& get(variant<_Types...>&& __v)
{
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
}
template<typename _Tp, typename... _Types>
- constexpr inline const _Tp& get(const variant<_Types...>& __v)
+ constexpr const _Tp& get(const variant<_Types...>& __v)
{
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
}
template<typename _Tp, typename... _Types>
- constexpr inline const _Tp&& get(const variant<_Types...>&& __v)
+ constexpr const _Tp&& get(const variant<_Types...>&& __v)
{
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
"T should occur for exactly once in alternatives");
}
template<size_t _Np, typename... _Types>
- constexpr inline
- add_pointer_t<variant_alternative_t<_Np, variant<_Types...>>>
+ constexpr add_pointer_t<variant_alternative_t<_Np, variant<_Types...>>>
get_if(variant<_Types...>* __ptr) noexcept
{
using _Alternative_type = variant_alternative_t<_Np, variant<_Types...>>;
}
template<size_t _Np, typename... _Types>
- constexpr inline
+ constexpr
add_pointer_t<const variant_alternative_t<_Np, variant<_Types...>>>
get_if(const variant<_Types...>* __ptr) noexcept
{
}
template<typename _Tp, typename... _Types>
- constexpr inline add_pointer_t<_Tp>
+ constexpr add_pointer_t<_Tp>
get_if(variant<_Types...>* __ptr) noexcept
{
static_assert(__detail::__variant::__exactly_once<_Tp, _Types...>,
}
template<typename _Tp, typename... _Types>
- constexpr inline add_pointer_t<const _Tp>
+ constexpr add_pointer_t<const _Tp>
get_if(const variant<_Types...>* __ptr)
noexcept
{
{ &__detail::__variant::__erased_##__NAME< \
const variant&, __indices>... }; \
template<size_t... __indices> \
- constexpr inline bool \
+ constexpr bool \
_M_##__NAME(const variant& __rhs, \
std::index_sequence<__indices...>) const \
{ \