C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tpf::types::tag_type< Type, Tag > Class Template Reference

#include <tpf_types.hpp>

Public Types

using type = Type
 

Public Member Functions

 tag_type (Type v=Type{}) noexcept
 
template<typename ArgType , typename... ArgTypes>
 tag_type (ArgType arg, ArgTypes... args) noexcept
 
 tag_type (const tag_type &) noexcept=default
 
tag_typeoperator= (const tag_type &) noexcept=default
 
 tag_type (tag_type &&) noexcept=default
 
tag_typeoperator= (tag_type &&) noexcept=default
 
const Type & get () const noexcept
 
Type & get () noexcept
 
 operator const Type & () const noexcept
 
 operator Type & () noexcept
 

Static Public Attributes

static constexpr Type tag = Tag
 

Protected Attributes

type value
 

Detailed Description

template<typename Type, Type Tag = Type{}>
class tpf::types::tag_type< Type, Tag >

Definition at line 301 of file tpf_types.hpp.

Member Typedef Documentation

◆ type

template<typename Type , Type Tag = Type{}>
using tpf::types::tag_type< Type, Tag >::type = Type

Definition at line 305 of file tpf_types.hpp.

Constructor & Destructor Documentation

◆ tag_type() [1/4]

template<typename Type , Type Tag = Type{}>
tpf::types::tag_type< Type, Tag >::tag_type ( Type  v = Type{})
inlinenoexcept

Definition at line 313 of file tpf_types.hpp.

◆ tag_type() [2/4]

template<typename Type , Type Tag = Type{}>
template<typename ArgType , typename... ArgTypes>
tpf::types::tag_type< Type, Tag >::tag_type ( ArgType  arg,
ArgTypes...  args 
)
inlinenoexcept

Definition at line 316 of file tpf_types.hpp.

◆ tag_type() [3/4]

template<typename Type , Type Tag = Type{}>
tpf::types::tag_type< Type, Tag >::tag_type ( const tag_type< Type, Tag > &  )
defaultnoexcept

◆ tag_type() [4/4]

template<typename Type , Type Tag = Type{}>
tpf::types::tag_type< Type, Tag >::tag_type ( tag_type< Type, Tag > &&  )
defaultnoexcept

Member Function Documentation

◆ get() [1/2]

template<typename Type , Type Tag = Type{}>
const Type & tpf::types::tag_type< Type, Tag >::get ( ) const
inlinenoexcept

Definition at line 325 of file tpf_types.hpp.

Here is the caller graph for this function:

◆ get() [2/2]

template<typename Type , Type Tag = Type{}>
Type & tpf::types::tag_type< Type, Tag >::get ( )
inlinenoexcept

Definition at line 326 of file tpf_types.hpp.

◆ operator const Type &()

template<typename Type , Type Tag = Type{}>
tpf::types::tag_type< Type, Tag >::operator const Type & ( ) const
inlinenoexcept

Definition at line 328 of file tpf_types.hpp.

Here is the call graph for this function:

◆ operator Type &()

template<typename Type , Type Tag = Type{}>
tpf::types::tag_type< Type, Tag >::operator Type & ( )
inlinenoexcept

Definition at line 329 of file tpf_types.hpp.

Here is the call graph for this function:

◆ operator=() [1/2]

template<typename Type , Type Tag = Type{}>
tag_type & tpf::types::tag_type< Type, Tag >::operator= ( const tag_type< Type, Tag > &  )
defaultnoexcept

◆ operator=() [2/2]

template<typename Type , Type Tag = Type{}>
tag_type & tpf::types::tag_type< Type, Tag >::operator= ( tag_type< Type, Tag > &&  )
defaultnoexcept

Member Data Documentation

◆ tag

template<typename Type , Type Tag = Type{}>
constexpr Type tpf::types::tag_type< Type, Tag >::tag = Tag
staticconstexpr

Definition at line 306 of file tpf_types.hpp.

◆ value

template<typename Type , Type Tag = Type{}>
type tpf::types::tag_type< Type, Tag >::value
protected

Definition at line 309 of file tpf_types.hpp.


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