plugify  1.0.0.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
plg::detail::union_node< IsLeaf, A, B > Struct Template Reference

Public Member Functions

template<std::size_t Index, class... Args>
 requires (node_trait< IsLeaf >::template ctor_branch< Index, A >==1) const expr explicit union_node(in_place_index_t< Index >
 
Args static_cast (args)...}
 
template<std::size_t Index, class... Args>
 requires (node_trait< IsLeaf >::template ctor_branch< Index, A >==2) const expr explicit union_node(in_place_index_t< Index >
 
Args static_cast (args)...}
 
template<class... Args>
 requires (IsLeaf) const expr explicit union_node(in_place_index_t< 0 >
 
else return b template get ()
 
template<union_index_t Index>
constexpr const auto & get () const
 
constexpr union_node (const union_node &)=default
 
constexpr union_node (const union_node &) requires((std
 
constexpr union_node (union_node &&) noexcept=default
 
constexpr union_node (union_node &&) noexcept requires((std
 
constexpr union_nodeoperator= (const union_node &)=default
 
constexpr union_nodeoperator= (const union_node &) requires((std
 
constexpr union_nodeoperator= (union_node &&) noexcept=default
 
constexpr union_nodeoperator= (union_node &&) noexcept requires((std
 

Public Attributes

union {
   A   a
 
   B   b
 
}; 
 
Args && args: a{in_place_index<Index>
 
Args Args && args: b{static_cast<Args&&>(args)...} {} constexpr explicit union_node(dummy_type) requires (std::is_same_v<dummy_type
 
Args Args B: b{} {} template<union_index_t Index> constexpr auto& get() { if constexpr (IsLeaf) { if constexpr (Index == 0) return a
 
else return b
 
 else
 

Static Public Attributes

static constexpr auto elem_size = node_trait<IsLeaf>::template elem_size<A, B>
 

Detailed Description

template<bool IsLeaf, class A, class B>
struct plg::detail::union_node< IsLeaf, A, B >

Definition at line 206 of file variant.hpp.

Member Data Documentation

◆ else

template<bool IsLeaf, class A , class B >
plg::detail::union_node< IsLeaf, A, B >::else
Initial value:
{
if constexpr (Index < A::elem_size)
return a.template get<Index>()

Definition at line 252 of file variant.hpp.


The documentation for this struct was generated from the following file: