你可以用
hana::template_
template<typename O>
using inner_type = typename O::type;
auto result = hana::transform(Types, hana::template_<inner_type>);
tuple_t
产生
tuple
类型
. 相反,它包含
hana::type
s、 哪些是
那个
代表
template_
打开类型级别函数(a
template
在值级别“元函数”中键入别名或类)。如果要为
transform
,你可以,但它会变得血淋淋:
auto result = hana::transform(Types, [](auto t) { return hana::type_c<typename decltype(t)::type::type>; })
t
在lambda是
hana::type<T>
对一些人来说
T
decltype(t)
从第一个值展开该类型
::type
得到
,第二
::类型
获取您的目标类型,以及
type_c
把它全部包起来。