|
Boost : |
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-05-07 14:22:32
// 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk