iterator_adaptor and operator-> for input iterators
I wrote an iterator to do recursive directory iteration. The heart of it
is:
template< typename Predicate >
class recursive_directory_iterator
: public boost::iterator_adaptor<
boost::shared_ptr< detail::rdi_imp< Predicate > >,
detail::rdi_policies,
const boost::filesystem::path,
const boost::filesystem::path &,
const boost::filesystem::path *,
std::input_iterator_tag,
std::ptrdiff_t >
{ ... };
Works fine as long as you stay away from operator->.
For example,
fs::recursive_directory_iterator
participants (1)
-
Beman Dawes