C++ Library Extensions 2022.12.09
To help learn modern C++ programming
012-is_integer.cpp
Go to the documentation of this file.
1#include <tpf_types.hpp>
2#include <tpf_output.hpp>
3
5{
6 tpf::ostream stream;
7 auto nl = "\n";
8
9 using tuple_t = std::tuple<>;
10
11 stream << tpf::types::is_tuple_v<tuple_t> << nl;
12
13 using variant_t = std::variant<>;
14
15 stream << tpf::types::is_variant_v<variant_t> << nl;
16
17 using any_t = std::any;
18
19 stream << tpf::types::is_any_v<any_t> << nl;
20
21 using vctr1_t = std::vector<int>;
22 using vctr2_t = std::vector<double>;
23
24 stream << tpf::types::is_same_template_type_v<vctr1_t, vctr2_t> << nl;
25 stream << tpf::types::is_same_template_type_v<vctr1_t, vctr1_t> << nl;
26 stream << tpf::types::is_same_template_type_v<int, int> << nl;
27 stream << tpf::types::is_same_template_v<vctr1_t, vctr2_t> << nl;
28
29 using vvctr_t = std::vector<std::vector<int>>;
30
31 stream << tpf::types::is_template_template_v<vvctr_t> << nl;
32
33
34}
35
37{
38 tpf::ostream stream;
39 auto nl = "\n";
40
42
43 stream << typelist{} << " are all numerical numbers: "
44 << tpf::types::are_numerical_numbers_v<typelist> << nl;
45
47}
48
49int main()
50{
52}
void examples_is_tuple()
void examples_is_integers()
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.