
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:00ce01c24f65$03862790$1d00a8c0@pdimov2...
I have since added ::value_type to shared_ptr, but unfortunately, this
is
apparently not enough. Even though the indirect iterator adaptor needs only the value_type, the attempt to instantiate std::iterator_traits means
From: "David Abrahams" <yg-boost-users@gmane.org> that
make_indirect_iterator cannot work with shared_ptr.
Why is that? There's no reason that instantiating std::iterator_traits<shared_ptr<T> > should cause a problem by itself.
Try it: #include <boost/shared_ptr.hpp> #include <iterator> int main() { std::iterator_traits< boost::shared_ptr<int> >::value_type i = 0; } When you instantiate iterator_traits, all of its typedefs are instantiated.