|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-07-16 10:57:51
Raoul Gough <yg-boost-users_at_[hidden]> writes:
> 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<outer_value>::value_type
> value_type;
> typedef typename boost::detail::iterator_traits<outer_value>::reference
> reference;
> typedef typename boost::detail::iterator_traits<outer_value>::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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net