Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2006-05-07 16:47:56


Tobias Schwinger wrote:
>// 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;
>}
>

Thanks for spotting that one. I'm working on a fix for the final release, and I will extend the tests
to cover the defect.

Cheers
Dan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk