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

Go to the source code of this file.

Typedefs

template<typename Type , typename... Types>
using enable_if_in_types_t = std::enable_if_t< types::is_in_list_v< Type, Types... >, Type >
 

Functions

void test_what_is_type_list ()
 
template<typename Type >
enable_if_in_types_t< Type, short, unsigned short, int, unsigned, long, unsigned long, long long, unsigned long long > remainder (Type n, Type d)
 
template<typename Type >
enable_if_in_types_t< Type, float, double > remainder (Type n, Type d)
 
void test_remainder ()
 
template<typename Type >
Type remainder_fn (Type n, Type d)
 
void test_remainder_fn ()
 
int main ()
 

Variables

tpf::sstream stream
 
auto endl = tpf::endl
 

Typedef Documentation

◆ enable_if_in_types_t

template<typename Type , typename... Types>
using enable_if_in_types_t = std::enable_if_t<types::is_in_list_v<Type, Types...>, Type>

Definition at line 33 of file 13-type_list.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 96 of file 13-type_list.cpp.

Here is the call graph for this function:

◆ remainder() [1/2]

template<typename Type >
enable_if_in_types_t< Type, short, unsigned short, int, unsigned, long, unsigned long, long long, unsigned long long > remainder ( Type  n,
Type  d 
)

Definition at line 37 of file 13-type_list.cpp.

Here is the caller graph for this function:

◆ remainder() [2/2]

template<typename Type >
enable_if_in_types_t< Type, float, double > remainder ( Type  n,
Type  d 
)

Definition at line 44 of file 13-type_list.cpp.

◆ remainder_fn()

template<typename Type >
Type remainder_fn ( Type  n,
Type  d 
)

Definition at line 62 of file 13-type_list.cpp.

Here is the caller graph for this function:

◆ test_remainder()

void test_remainder ( )

Definition at line 51 of file 13-type_list.cpp.

Here is the call graph for this function:

◆ test_remainder_fn()

void test_remainder_fn ( )

Definition at line 87 of file 13-type_list.cpp.

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

◆ test_what_is_type_list()

void test_what_is_type_list ( )

Definition at line 8 of file 13-type_list.cpp.

Variable Documentation

◆ endl

auto endl = tpf::endl

Definition at line 4 of file 13-type_list.cpp.

◆ stream

tpf::sstream stream

Definition at line 3 of file 13-type_list.cpp.