Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2006-10-29 16:21:44


Eric Niebler wrote: >A fusion transform_view of a random access sequence should itself be a >random access sequence, and its category is random access, but it >doesn't seem to implement the complete interface. For instance: > >struct plus1 >{ > template<typename T> struct result { typedef T type; }; > template<typename T> T operator ()(T const &t) const > { > return t + 1; > } >}; > >template<typename V> >void bar(V const &v) >{ > boost::fusion::at_c<1>(v); // OK > boost::fusion::transform_view<V const, plus1> view(v, plus1()); > boost::fusion::at_c<1>(view); // ERROR >} > >int main() >{ > bar(boost::fusion::make_vector(1,2,3)); > return 0; >} > > >I can't randomly access elements of a transformed fusion::vector. Bug? The at_impl had been completed omitted. I've fixed this in the cvs, and added covering tests. Thanks for spotting this. Cheers Dan ___________________________________________________________ Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street Journal http://uk.docs.yahoo.com/nowyoucan.html


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