C++ Library Extensions 2022.12.09
To help learn modern C++ programming
010-union_type.cpp
Go to the documentation of this file.
1#include <tpf_types.hpp>
2#include <tpf_output.hpp>
3
5{
8
9 tpf::ostream stream;
10 auto nl = "\n";
11
12 stream << tpf::types::union_type_t<list1, list2>{} << nl;
13
14 stream << tpf::types::union_type_t<char, list1>{} << nl;
15 stream << tpf::types::union_type_t<int, list1>{} << nl;
16
17}
18
20{
23
24 tpf::ostream stream;
25 auto nl = "\n";
26
27 stream << tpf::types::intersection_type_t<list1, list2>{} << nl;
28}
29
31{
34
35 tpf::ostream stream;
36 auto nl = "\n";
37
38 stream << tpf::types::remove_type_t<int, list1>{} << nl;
39
40 stream << tpf::types::remove_type_t<short, list1>{} << nl;
41}
42
44{
47
48 tpf::ostream stream;
49 auto nl = "\n";
50
51 stream << tpf::types::difference_type_t<list1, list2>{} << nl;
52 stream << tpf::types::difference_type_t<list2, list1>{} << nl;
53}
54
56{
59
60 tpf::ostream stream;
61 auto nl = "\n";
62 stream.std() << std::boolalpha;
63
64 stream << tpf::types::is_type_list_equivalent_v<list1, list2> << nl;
65 stream << tpf::types::is_type_list_equivalent_v<list2, list1> << nl;
66}
67
68int main()
69{
70 // examples_union_type_t();
71 // examples_intersection_type_t();
72 // examples_remove_type_t();
73 // examples_difference_type_t();
75}
void examples_difference_type_t()
void examples_type_list_equivalent_type_t()
void examples_union_type_t()
void examples_intersection_type_t()
void examples_remove_type_t()
int main()
auto nl
tpf::sstream stream
This type is used to manipulate type list.
Definition: tpf_types.hpp:956
Stream output operators << are implemented.
Type functions are implemented.