C++ Library Extensions 2022.12.09
To help learn modern C++ programming
31-visit.cpp File Reference
#include <tpf_output.hpp>
Include dependency graph for 31-visit.cpp:

Go to the source code of this file.

Classes

struct  tpf::types::is_pair_type_st< Type >
 
struct  tpf::types::is_pair_type_st< std::pair< Type_1, Type_2 > >
 
struct  tpf::types::is_pair_of_variant_type_st< Type >
 
struct  tpf::types::is_pair_of_variant_type_st< std::pair< Type, std::variant< Types... > > >
 
struct  tpf::types::is_variant_type_st< Type >
 
struct  tpf::types::is_variant_type_st< std::variant< Types... > >
 
struct  tpf::types::compile_time_loop< StartIndex, EndIndex >
 
struct  tpf::types::overloaded< VisitorTypes >
 

Namespaces

namespace  tpf
 Includes subnamespace conversion.
 
namespace  tpf::types
 Type to string name conversions are defined.
 

Typedefs

template<typename Type , typename ReturnType = void>
using tpf::types::enable_if_pair_t = std::enable_if_t< is_pair_type_v< Type >, ReturnType >
 
template<typename Type , typename ReturnType = void>
using tpf::types::enable_if_pair_of_variant_t = std::enable_if_t< is_pair_of_variant_type_v< Type >, ReturnType >
 
template<typename Type , typename ReturnType = void>
using tpf::types::enable_if_variant_t = std::enable_if_t< is_variant_type_v< Type >, ReturnType >
 

Functions

template<typename VisitorType , typename VariantType >
enable_if_variant_t< VariantType > tpf::types::visit (VisitorType &&visitor, VariantType &&vt)
 
template<typename VisitorType , typename PairType >
enable_if_pair_of_variant_t< PairType > tpf::types::visit (VisitorType &&visitor, PairType &&pair)
 
template<typename... VisitorTypes>
 tpf::types::overloaded (VisitorTypes...) -> overloaded< VisitorTypes... >
 
template<typename... VisitorTypes>
overloaded< remove_cv_ref_t< VisitorTypes >... > tpf::types::make_overloads (VisitorTypes &&... visitors)
 
void test_visit_simplified ()
 
void test_visit_simplified_set ()
 
void test_visit_simplified_map ()
 
int main ()
 

Variables

tpf::sstream stream
 
auto endl = tpf::endl
 
template<typename Type >
constexpr bool tpf::types::is_pair_type_v = is_pair_type_st<remove_cv_ref_t<Type>>::value
 
template<typename Type >
constexpr bool tpf::types::is_pair_of_variant_type_v = is_pair_of_variant_type_st<remove_cv_ref_t<Type>>::value
 
template<typename Type >
constexpr bool tpf::types::is_variant_type_v = is_variant_type_st<remove_cv_ref_t<Type>>::value
 

Function Documentation

◆ main()

int main ( )

Definition at line 340 of file 31-visit.cpp.

Here is the call graph for this function:

◆ test_visit_simplified()

void test_visit_simplified ( )

Definition at line 196 of file 31-visit.cpp.

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

◆ test_visit_simplified_map()

void test_visit_simplified_map ( )

Definition at line 296 of file 31-visit.cpp.

Here is the call graph for this function:

◆ test_visit_simplified_set()

void test_visit_simplified_set ( )

Definition at line 253 of file 31-visit.cpp.

Here is the call graph for this function:

Variable Documentation

◆ endl

auto endl = tpf::endl

Definition at line 4 of file 31-visit.cpp.

◆ stream

tpf::sstream stream

Definition at line 3 of file 31-visit.cpp.