[iterator] Using iterator_facade with range-v3
I'm having trouble using iterators implemented in terms of boost::iterator_facade with the range-v3 library. The problem is decltype(it++) which in my case is postfix_increment_proxy<>, desn't model the Readable concept, because it isn't DefaultConstructible and doesn't have a ppublic value_type nested typedef. To me it seems reasonable to require decltype(it++) to model Readable, so I created a ticket (a test case and a patch with the proposed solution included) please see: https://svn.boost.org/trac/boost/ticket/12071 See also the discussion at range-v3: https://github.com/ericniebler/range-v3/issues/304 Kind regards, Kris
Maybe a high-level example demonstrating the problem will be helpful:
#include <iostream>
#include "third_party/boost/allowed/iterator/iterator_facade.hpp"
#include "third_party/range_v3/include/range/v3/algorithm/copy.hpp"
#include "third_party/range_v3/include/range/v3/iterator_range.hpp"
#include "third_party/range_v3/include/range/v3/utility/iterator.hpp"
template
I'm having trouble using iterators implemented in terms of boost::iterator_facade with the range-v3 library.
The problem is decltype(it++) which in my case is postfix_increment_proxy<>, desn't model the Readable concept, because it isn't DefaultConstructible and doesn't have a ppublic value_type nested typedef.
To me it seems reasonable to require decltype(it++) to model Readable, so I created a ticket (a test case and a patch with the proposed solution included) please see: https://svn.boost.org/trac/boost/ticket/12071
See also the discussion at range-v3: https://github.com/ericniebler/range-v3/issues/304
Kind regards, Kris
participants (1)
-
Krzysztof Czainski