如何从mpl::vector
生成fusion::vector
? 如何从fusion::vector
生成mpl::vector
?从mpl :: vector生成fusion :: vector
BOOST_MPL_ASSERT((is_same<
fusion::vector<int, char>,
generate_fusion_vector<mpl::vector<int, char> >::type >));
BOOST_MPL_ASSERT((is_same<
mpl::vector<int, char>,
generate_mpl_vector<fusion::vector<int, char> >::type >));
我需要generate_fusion_vector
和generate_mpl_vector
元函数。 我可以编写自己的元函数,但我怀疑它们已经存在。
我曾与前帮助result_of::as_map
产生fusion::map
的经验,但在当前增压(躯干,1.39还)出现这样的错误:
D:\Libraries\boost_trunk\boost/fusion/sequence/intrinsic/size.hpp(56) : error C2903: 'apply' : symbol is neither a class template nor a function template
D:\Libraries\boost_trunk\boost/fusion/container/vector/convert.hpp(23) : see reference to class template instantiation 'boost::fusion::result_of::size' being compiled
with
[
Sequence=boost::mpl::vector
]
temp.cpp(71) : see reference to class template instantiation 'boost::fusion::result_of::as_vector' being compiled
我不明白这是怎么回事?
你需要计算与mpl :: vector类型相同的fusion :: vector类型(mpl :: vectors只有类型,而不是值),还是你的意思是mpl :: vector_c? – 2009-06-24 08:44:13
我想计算一个类型。 – Andreo 2009-06-24 08:57:10