Raoul Gough
Using gcc 3.2 (on MinGW) the template parameter defaults for indirect_iterator_generator don't work with shared_ptr. This has been discussed* on the list before, but there doesn't seem to have been a user-friendly resolution to the issues involved (at least not in release 1_30_0).
Right. The user-friendly solution is to use the iterator adaptors in the current Boost CVS. There won't be a fix for 1.30.0.
Looking at iterator_adaptors.hpp:1111 we have (reformatted):
struct traits_of_value_type { typedef typename boost::detail::iterator_traits<T>::value_type outer_value; typedef typename boost::detail::iterator_traits
::value_type value_type; typedef typename boost::detail::iterator_traits ::reference reference; typedef typename boost::detail::iterator_traits ::pointer pointer; }; So traits_of_value_type tries to look up the *iterator_traits* of the *value type* for the supplied iterator. Does the value type really need to have complete iterator traits for the compiler to figure out the defaults here? Is anybody working on improving the ease-of-use for indirect_iterator_generator?
Nope. You could always specialize traits_of_value_type to make it work for your case. -- Dave Abrahams Boost Consulting www.boost-consulting.com