
I've tried writing an iterator with iterator_facade that returns itself as the result of dereference, but the Value template argument requires a complete type because it tries to make a difference between returning by value or reference if Value is_pod (as far as I understand). #include <boost/iterator/iterator_facade.hpp> class iter : public boost::iterator_facade< iter, iter, boost::forward_traversal_tag > { public: void fancy_non_iterator_member(); private: friend class boost::iterator_core_access; void increment() { } bool equal(iter const& other) const { return true; } iter& dereference() const { return const_cast<Derived&>(static_cast<const Derived&>(*this)); } }; Is this the intended behavior of iterator_facade? Is there some workaround? Would such an iterator actually be conforming? -- Philipp Moeller GeometryFactory