CETL 0.0.0
 
Loading...
Searching...
No Matches
variant.hpp File Reference
#include <cetl/cetl.hpp>
#include <cetl/pf17/utility.hpp>
#include <cetl/pf17/type_traits.hpp>
#include <cetl/type_traits_ext.hpp>
#include <tuple>
#include <array>
#include <limits>
#include <cassert>
#include <algorithm>
#include <exception>
#include <type_traits>
Include dependency graph for variant.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  cetl::pf17::monostate
 
class  cetl::pf17::bad_variant_access
 
struct  cetl::pf17::variant_alternative< N, V< Ts... > >
 
struct  cetl::pf17::variant_alternative< N, const V< Ts... > >
 
struct  cetl::pf17::variant_size< const V >
 
struct  cetl::pf17::variant_size< V< Ts... > >
 
class  cetl::pf17::variant< Ts >
 

Namespaces

namespace  cetl
 
namespace  cetl::pf17
 

Typedefs

template<size_t N, typename V>
using cetl::pf17::variant_alternative_t = typename variant_alternative<N, V>::type
 

Functions

constexpr bool cetl::pf17::operator== (const monostate, const monostate) noexcept
 
constexpr bool cetl::pf17::operator!= (const monostate, const monostate) noexcept
 
constexpr bool cetl::pf17::operator< (const monostate, const monostate) noexcept
 
constexpr bool cetl::pf17::operator> (const monostate, const monostate) noexcept
 
constexpr bool cetl::pf17::operator<= (const monostate, const monostate) noexcept
 
constexpr bool cetl::pf17::operator>= (const monostate, const monostate) noexcept
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr bool cetl::pf17::holds_alternative (const variant< Ts... > &var) noexcept
 
template<typename Fun, typename... Vs>
constexpr decltype(auto) cetl::pf17::visit (Fun &&fun, Vs &&... vars)
 
template<typename... Ts>
constexpr bool cetl::pf17::operator== (const variant< Ts... > &lhs, const variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr bool cetl::pf17::operator!= (const variant< Ts... > &lhs, const variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr bool cetl::pf17::operator< (const variant< Ts... > &lhs, const variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr bool cetl::pf17::operator> (const variant< Ts... > &lhs, const variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr bool cetl::pf17::operator<= (const variant< Ts... > &lhs, const variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr bool cetl::pf17::operator>= (const variant< Ts... > &lhs, const variant< Ts... > &rhs)
 
template<std::size_t Ix, typename... Ts>
CETL_NODISCARD constexpr std::add_pointer_t< variant_alternative_t< Ix, variant< Ts... > > > cetl::pf17::get_if (variant< Ts... > *const var) noexcept
 
template<std::size_t Ix, typename... Ts>
CETL_NODISCARD constexpr std::add_pointer_t< const variant_alternative_t< Ix, variant< Ts... > > > cetl::pf17::get_if (const variant< Ts... > *const var) noexcept
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr std::add_pointer_t< T > cetl::pf17::get_if (variant< Ts... > *const var) noexcept
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr std::add_pointer_t< const T > cetl::pf17::get_if (const variant< Ts... > *const var) noexcept
 
template<std::size_t Ix, typename... Ts>
CETL_NODISCARD constexpr variant_alternative_t< Ix, variant< Ts... > > & cetl::pf17::get (variant< Ts... > &var)
 
template<std::size_t Ix, typename... Ts>
CETL_NODISCARD constexpr variant_alternative_t< Ix, variant< Ts... > > && cetl::pf17::get (variant< Ts... > &&var)
 
template<std::size_t Ix, typename... Ts>
CETL_NODISCARD constexpr const variant_alternative_t< Ix, variant< Ts... > > & cetl::pf17::get (const variant< Ts... > &var)
 
template<std::size_t Ix, typename... Ts>
CETL_NODISCARD constexpr const variant_alternative_t< Ix, variant< Ts... > > && cetl::pf17::get (const variant< Ts... > &&var)
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr T & cetl::pf17::get (variant< Ts... > &var)
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr T && cetl::pf17::get (variant< Ts... > &&var)
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr const T & cetl::pf17::get (const variant< Ts... > &var)
 
template<typename T, typename... Ts>
CETL_NODISCARD constexpr const T && cetl::pf17::get (const variant< Ts... > &&var)
 

Variables

constexpr std::size_t cetl::pf17::variant_npos = std::numeric_limits<std::size_t>::max()
 
template<typename V>
constexpr size_t cetl::pf17::variant_size_v = variant_size<V>::value
 

Detailed Description

Defines the C++17 std::variant type and several related entities.