CETL 0.0.0
 
Loading...
Searching...
No Matches
unbounded_variant.hpp File Reference
#include "rtti.hpp"
#include <algorithm>
#include <cstddef>
#include <exception>
#include <initializer_list>
#include <utility>
Include dependency graph for unbounded_variant.hpp:

Classes

class  cetl::bad_unbounded_variant_access
 
class  cetl::unbounded_variant< Footprint, Copyable, Movable, Alignment, Pmr >
 
struct  cetl::unbounded_variant< Footprint, Copyable, Movable, Alignment, Pmr >::in_place_type_t< T >
 

Namespaces

namespace  cetl
 

Typedefs

template<typename Pmr>
using cetl::detail::IsPmr = std::integral_constant<bool, !std::is_void<Pmr>::value>
 
template<typename Pmr>
using cetl::detail::EnableIfPmrT = std::enable_if_t<IsPmr<Pmr>::value>
 
template<typename Pmr>
using cetl::detail::EnableIfNotPmrT = std::enable_if_t<!IsPmr<Pmr>::value>
 
template<typename ValueType>
using cetl::unbounded_variant_like
 

Functions

std::nullptr_t cetl::detail::throw_bad_alloc ()
 
void cetl::detail::throw_bad_unbounded_variant_access ()
 
template<typename ValueType, typename UnboundedVariant>
std::add_pointer_t< ValueType > cetl::get_if (UnboundedVariant *operand)
 
template<typename ValueType, typename UnboundedVariant>
std::add_pointer_t< std::add_const_t< ValueType > > cetl::get_if (const UnboundedVariant *operand)
 
template<typename ValueType, typename UnboundedVariant = unbounded_variant_like<ValueType>, typename... Args, typename = detail::EnableIfNotPmrT<typename UnboundedVariant::pmr_type>>
CETL_NODISCARD UnboundedVariant cetl::make_unbounded_variant (Args &&... args)
 
template<typename ValueType, typename UnboundedVariant = unbounded_variant_like<ValueType>, typename Up, typename... Args, typename = detail::EnableIfNotPmrT<typename UnboundedVariant::pmr_type>>
CETL_NODISCARD UnboundedVariant cetl::make_unbounded_variant (std::initializer_list< Up > list, Args &&... args)
 
template<typename ValueType, typename UnboundedVariant = unbounded_variant_like<ValueType>, typename... Args, typename = detail::EnableIfPmrT<typename UnboundedVariant::pmr_type>>
CETL_NODISCARD UnboundedVariant cetl::make_unbounded_variant (typename UnboundedVariant::pmr_type *const mem_res, Args &&... args)
 
template<typename ValueType, typename UnboundedVariant = unbounded_variant_like<ValueType>, typename Up, typename... Args, typename = detail::EnableIfPmrT<typename UnboundedVariant::pmr_type>>
CETL_NODISCARD UnboundedVariant cetl::make_unbounded_variant (typename UnboundedVariant::pmr_type *const mem_res, std::initializer_list< Up > list, Args &&... args)
 
template<typename ValueType, typename UnboundedVariant>
CETL_NODISCARD ValueType cetl::get (const UnboundedVariant &operand)
 
template<typename ValueType, typename UnboundedVariant>
CETL_NODISCARD ValueType cetl::get (UnboundedVariant &operand)
 
template<typename ValueType, typename UnboundedVariant>
CETL_NODISCARD ValueType cetl::get (UnboundedVariant &&operand)
 
template<typename ValueType, typename UnboundedVariant>
CETL_NODISCARD std::add_pointer_t< std::add_const_t< ValueType > > cetl::get_if (const UnboundedVariant *const operand)
 
template<typename ValueType, typename UnboundedVariant>
CETL_NODISCARD std::add_pointer_t< ValueType > cetl::get_if (UnboundedVariant *const operand)
 

Detailed Description

Includes cetl::unbounded_variant type and non-member functions.