12 stream <<
"Is type a template? " << types::is_template_v<Type> <<
endl;
22 std::vector<int> v{1, 2, 3, 4, 5};
27template<
typename Type1,
typename Type2>
30 if constexpr(types::is_template_v<Type1>)
32 stream <<
"Type1 is a template class " <<
endl;
34 stream <<
"The first template argment of Type1 is "
37 stream <<
"All template arguments: "
43 <<
" is not a template class." <<
endl;
48 if constexpr(types::is_template_v<Type2>)
50 stream <<
"Type2 is a template class " <<
endl;
52 stream <<
"The first template argment of Type2 is "
55 stream <<
"All template arguments: "
61 <<
" is not a template class." <<
endl;
70 std::vector<int> v { 1, 2, 3, 4, 5};
71 std::map<std::string, double> m;
73 m[
"apple price"] = 100.0;
74 m[
"peach price"] = 300.0;
81 using tuple_t = std::tuple<int, double, short, const char*>;
92 stream <<
"All template arguments: " << template_arguments{} <<
endl;
96 using variant_t = std::variant<int, double, short, const char*, long long>;
107 stream <<
"All template arguments: " << template_arguments1{} <<
endl;
void test_template_argument_extraction()
void extract_template_arguments(Type1 arg1, Type2 arg2)
void is_template_class(Type value)
void test_extract_template_arguments()
Type to string name conversions are defined.
hidden::select_first_type_t< Types... > select_first_type_t
hidden::template_parameter_type_list_t< Type > template_parameter_type_list_t
hidden::select_last_type_t< Types... > select_last_type_t
hidden::first_parameter_type_t< Type > first_parameter_type_t
Stream output operators << are implemented.
#define Tpf_GetTypeName(type_arg)
A macro that returns type_arg's string name.