C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tutorial Namespace Reference

Classes

struct  is_tuple_st
 
struct  is_tuple_st< std::tuple< Types... > >
 
struct  is_variant_st
 
struct  is_variant_st< std::variant< Types... > >
 
struct  static_loop
 

Typedefs

template<typename Type >
using remove_cv_ref_t = std::remove_cv_t< std::remove_reference_t< Type > >
 

Functions

template<typename... Types>
void print_tuple (std::ostream &os, const std::tuple< Types... > &tpl)
 
template<typename Type , typename... Types>
void print_variant (std::ostream &os, const std::variant< Type, Types... > &vrt)
 
template<typename... Types>
std::ostream & operator<< (std::ostream &os, const std::tuple< Types... > &tpl)
 
template<typename Type , typename... Types>
std::ostream & operator<< (std::ostream &os, const std::variant< Type, Types... > &vrt)
 

Variables

template<typename Type >
constexpr bool is_variant_v = is_variant_st<remove_cv_ref_t<Type>>::value
 
template<typename Type >
constexpr bool is_tuple_v = is_tuple_st<remove_cv_ref_t<Type>>::value
 

Typedef Documentation

◆ remove_cv_ref_t

template<typename Type >
using tutorial::remove_cv_ref_t = typedef std::remove_cv_t<std::remove_reference_t<Type> >

Definition at line 19 of file 33-variant_tuple_output.cpp.

Function Documentation

◆ operator<<() [1/2]

template<typename... Types>
std::ostream & tutorial::operator<< ( std::ostream &  os,
const std::tuple< Types... > &  tpl 
)

Definition at line 154 of file 33-variant_tuple_output.cpp.

Here is the call graph for this function:

◆ operator<<() [2/2]

template<typename Type , typename... Types>
std::ostream & tutorial::operator<< ( std::ostream &  os,
const std::variant< Type, Types... > &  vrt 
)

Definition at line 161 of file 33-variant_tuple_output.cpp.

Here is the call graph for this function:

◆ print_tuple()

template<typename... Types>
void tutorial::print_tuple ( std::ostream &  os,
const std::tuple< Types... > &  tpl 
)

Definition at line 129 of file 33-variant_tuple_output.cpp.

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

◆ print_variant()

template<typename Type , typename... Types>
void tutorial::print_variant ( std::ostream &  os,
const std::variant< Type, Types... > &  vrt 
)

Definition at line 145 of file 33-variant_tuple_output.cpp.

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

Variable Documentation

◆ is_tuple_v

template<typename Type >
constexpr bool tutorial::is_tuple_v = is_tuple_st<remove_cv_ref_t<Type>>::value
constexpr

Definition at line 49 of file 33-variant_tuple_output.cpp.

◆ is_variant_v

template<typename Type >
constexpr bool tutorial::is_variant_v = is_variant_st<remove_cv_ref_t<Type>>::value
constexpr

Definition at line 34 of file 33-variant_tuple_output.cpp.