
7 May
2006
7 May
'06
6:22 p.m.
// fusion::vector::at_impl requires specialization of mpl::int_ // (and doesn't work with other Integral Constants). #include <iostream> #include <boost/mpl/integral_c.hpp> #include <boost/mpl/int.hpp> #include <boost/fusion/sequence/container/vector.hpp> #include <boost/fusion/sequence/generation/make_vector.hpp> #include <boost/fusion/sequence/intrinsic/at.hpp> int main() { using namespace boost::fusion; namespace mpl = boost::mpl; std::cout << at< mpl::int_<0> >( make_vector("hello","bug")) << std::endl; // OK std::cout << at< mpl::integral_c<int,0> >( make_vector("hello","bug")) << std::endl; // ERROR return 0; } -- Regards, Tobias