7#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_VARIANT_TRAITS_HPP_
8#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_VARIANT_TRAITS_HPP_
15#include "arene/base/stdlib_choice/add_const.hpp"
16#include "arene/base/stdlib_choice/cstddef.hpp"
17#include "arene/base/stdlib_choice/integral_constant.hpp"
18#include "arene/base/stdlib_choice/numeric_limits.hpp"
29template <
typename... Ts>
37template <
typename Variant>
42template <
typename... Ts>
47template <
typename... Ts>
52template <
typename Variant>
58template <std::
size_t I,
class T>
73template <std::
size_t I,
class T>
83template <std::
size_t I,
class T>
Helper struct to get the size of a variant.
Definition traits.hpp:53
Forward declaration of variant.
Definition variant.hpp:540
Add const to the provided type. The type member is an alias for the modified type.
Definition add_const.hpp:18
A helper class to represent a compile-time constant with the specified type and value....
Definition integral_constant.hpp:23
static constexpr auto max() noexcept -> T
The maximum finite value.
Definition numeric_limits.hpp:230
typename at< L0, Index >::type at_t
Get the n-th element from a type list.
Definition at.hpp:113
Definition accumulate.hpp:37
constexpr std::size_t variant_size_v
Declaration of variant_size_v. Default to variant_npos.
Definition traits.hpp:38
constexpr std::size_t variant_npos
Special value used as the return value of variant::index() when variant::valueless_by_exception() is ...
Definition traits.hpp:34
typename variant_alternative< I, T >::type variant_alternative_t
Helper type of variant_size variant_alternative.
Definition traits.hpp:84
Definition accumulate.hpp:36
::size_t size_t
A type suitable for holding the size of an object.
Definition cstddef.hpp:29
an empty struct that is a list of types - cheaper to instantiate than tuple
Definition type_list.hpp:19
typename std::add_const< typename variant_alternative< I, T >::type >::type type
const-qualified alternative type
Definition traits.hpp:77
type_lists::at_t< type_list< Ts... >, I > type
alternative type
Definition traits.hpp:67
Traits to get the I-th type of a variant.
Definition traits.hpp:59