3
当我尝试编译此:如何使用boost :: mpl :: fold和boost :: fusion :: map?
#include <boost/fusion/container/map.hpp>
#include <boost/mpl/fold.hpp>
int main(int argc, char** argv)
{
typedef boost::fusion::map
<
boost::fusion::pair<int, const char*>,
boost::fusion::pair<long, char>
> FuMap;
FuMap fuMap("hello", 'w');
unsigned val = boost::mpl::fold
<
FuMap, boost::mpl::int_<0>, boost::mpl::next<boost::mpl::_1>
>::type::value;
}
我收到以下错误:
"...boost/mpl/begin_end.hpp", line 35: Error, nofieldfnd:
apply is not a member of
boost::mpl::begin_impl<boost::fusion::fusion_sequence_tag>.
从融合文档:“融合提供了完整的圆兼容性 与MPL融合序列完全符合MPL。序列和MPL 序列与Fusion完全兼容。如果您希望仅使用类型,则可以在MPL上使用Fusion 序列。“
当我通过一个boost :: mpl :: map它的作品。
任何线索?
包括抱歉,小于和大于抹去什么 – wallyk 2009-12-30 17:10:44
?包括。现在它是固定的 – chila 2009-12-30 17:12:42
谢谢,我编辑它为清晰 – wallyk 2009-12-30 17:14:31