TrinityCore
Trinity::ChatCommands::Variant< T1, Ts > Struct Template Reference

#include <ChatCommandTags.h>

+ Inheritance diagram for Trinity::ChatCommands::Variant< T1, Ts >:

Public Types

using base = std::variant< T1, Ts... >
 
using first_type = Trinity::Impl::ChatCommands::tag_base_t< T1 >
 

Public Member Functions

template<bool C = have_operators>
std::enable_if_t< C, first_typeoperator* () const
 
template<bool C = have_operators>
 operator std::enable_if_t< C, first_type > () const
 
template<bool C = have_operators>
std::enable_if_t< C, bool > operator! () const
 
template<typename T >
Variantoperator= (T &&arg)
 
template<size_t index>
constexpr decltype(auto) get ()
 
template<size_t index>
constexpr decltype(auto) get () const
 
template<typename type >
constexpr decltype(auto) get ()
 
template<typename type >
constexpr decltype(auto) get () const
 
template<typename T >
constexpr decltype(auto) visit (T &&arg)
 
template<typename T >
constexpr decltype(auto) visit (T &&arg) const
 
template<typename T >
constexpr bool holds_alternative () const
 

Static Public Attributes

static constexpr bool have_operators = Trinity::Impl::ChatCommands::are_all_assignable<first_type, Trinity::Impl::ChatCommands::tag_base_t<Ts>...>::value
 

Friends

template<bool C = have_operators>
std::enable_if_t< C, std::ostream & > operator<< (std::ostream &os, Trinity::ChatCommands::Variant< T1, Ts... > const &v)
 

Detailed Description

template<typename T1, typename... Ts>
struct Trinity::ChatCommands::Variant< T1, Ts >

Definition at line 263 of file ChatCommandTags.h.

Member Typedef Documentation

◆ base

template<typename T1 , typename... Ts>
using Trinity::ChatCommands::Variant< T1, Ts >::base = std::variant<T1, Ts...>

Definition at line 265 of file ChatCommandTags.h.

◆ first_type

template<typename T1 , typename... Ts>
using Trinity::ChatCommands::Variant< T1, Ts >::first_type = Trinity::Impl::ChatCommands::tag_base_t<T1>

Definition at line 267 of file ChatCommandTags.h.

Member Function Documentation

◆ get() [1/4]

template<typename T1 , typename... Ts>
template<size_t index>
constexpr decltype(auto) Trinity::ChatCommands::Variant< T1, Ts >::get ( )
inlineconstexpr

Definition at line 289 of file ChatCommandTags.h.

+ Here is the caller graph for this function:

◆ get() [2/4]

template<typename T1 , typename... Ts>
template<typename type >
constexpr decltype(auto) Trinity::ChatCommands::Variant< T1, Ts >::get ( )
inlineconstexpr

Definition at line 293 of file ChatCommandTags.h.

◆ get() [3/4]

template<typename T1 , typename... Ts>
template<size_t index>
constexpr decltype(auto) Trinity::ChatCommands::Variant< T1, Ts >::get ( ) const
inlineconstexpr

Definition at line 291 of file ChatCommandTags.h.

◆ get() [4/4]

template<typename T1 , typename... Ts>
template<typename type >
constexpr decltype(auto) Trinity::ChatCommands::Variant< T1, Ts >::get ( ) const
inlineconstexpr

Definition at line 295 of file ChatCommandTags.h.

◆ holds_alternative()

template<typename T1 , typename... Ts>
template<typename T >
constexpr bool Trinity::ChatCommands::Variant< T1, Ts >::holds_alternative ( ) const
inlineconstexpr

Definition at line 303 of file ChatCommandTags.h.

+ Here is the caller graph for this function:

◆ operator std::enable_if_t< C, first_type >()

template<typename T1 , typename... Ts>
template<bool C = have_operators>
Trinity::ChatCommands::Variant< T1, Ts >::operator std::enable_if_t< C, first_type > ( ) const
inline

Definition at line 277 of file ChatCommandTags.h.

+ Here is the call graph for this function:

◆ operator!()

template<typename T1 , typename... Ts>
template<bool C = have_operators>
std::enable_if_t< C, bool > Trinity::ChatCommands::Variant< T1, Ts >::operator! ( ) const
inline

Definition at line 283 of file ChatCommandTags.h.

◆ operator*()

template<typename T1 , typename... Ts>
template<bool C = have_operators>
std::enable_if_t< C, first_type > Trinity::ChatCommands::Variant< T1, Ts >::operator* ( ) const
inline

Definition at line 271 of file ChatCommandTags.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

template<typename T1 , typename... Ts>
template<typename T >
Variant & Trinity::ChatCommands::Variant< T1, Ts >::operator= ( T &&  arg)
inline

Definition at line 286 of file ChatCommandTags.h.

◆ visit() [1/2]

template<typename T1 , typename... Ts>
template<typename T >
constexpr decltype(auto) Trinity::ChatCommands::Variant< T1, Ts >::visit ( T &&  arg)
inlineconstexpr

Definition at line 298 of file ChatCommandTags.h.

+ Here is the caller graph for this function:

◆ visit() [2/2]

template<typename T1 , typename... Ts>
template<typename T >
constexpr decltype(auto) Trinity::ChatCommands::Variant< T1, Ts >::visit ( T &&  arg) const
inlineconstexpr

Definition at line 300 of file ChatCommandTags.h.

Friends And Related Function Documentation

◆ operator<<

template<typename T1 , typename... Ts>
template<bool C = have_operators>
std::enable_if_t< C, std::ostream & > operator<< ( std::ostream &  os,
Trinity::ChatCommands::Variant< T1, Ts... > const &  v 
)
friend

Definition at line 306 of file ChatCommandTags.h.

Member Data Documentation

◆ have_operators

template<typename T1 , typename... Ts>
constexpr bool Trinity::ChatCommands::Variant< T1, Ts >::have_operators = Trinity::Impl::ChatCommands::are_all_assignable<first_type, Trinity::Impl::ChatCommands::tag_base_t<Ts>...>::value
staticconstexpr

Definition at line 268 of file ChatCommandTags.h.


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