【发布时间】:2016-07-31 20:08:18
【问题描述】:
static constexpr auto type_tuple_c = hana::tuple_t<T...>;
static constexpr auto idx_tuple_c = hana::tuple_c<std::size_t, 0, sizeof...(T)>;
我想将这两个大小相等的序列相互映射。但是,我似乎无法理解如何使用 hana::map 功能获得它:
static constexpr auto type_idx_map_c = hana::unpack(
hana::zip_with(hana::make_pair, type_tuple_c, idx_tuple_c)
, hana::make_map
);
无论我进行什么转换,我似乎都无法创建映射。我了解地图要求其元素属于产品概念,但我似乎无法理解(甚至无法理解)关于压缩结构的行为。
有什么我可以做的,或者我做错了什么?
运行 gcc version 6.0.0 20160320 和 hana version 0.7.0 今天最后一次获取
【问题讨论】:
标签: c++ boost boost-hana