Re: [Boost-users] boost::transform_iterator, boost::array::iterator and category
Try returning a reference const double& instead of double. struct UnaryFunction { typedef const double& result_type; const double& operator()( const pair
& e ) const { return e.first; } }; Random access iterators must return an lvalue. In Christ, Steven Watanabe
Thank you, the transformed iterator's category now matches std::random_access_iterator_tag. So in general, if I am passed a iterator (regardless whether it has been transformed by transform_iterator<> or not), the most generic test for random access category in C++03 __is__ against std::random_access_iterator_tag, __not__ against boost::random_access_traversal_tag. The latter is some implementation detail for the Boost.Iterator library, right? Thanks again,
participants (1)
-
Hicham Mouline