如何從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