Boost logo

Boost :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-01-08 10:34:04

Using an indirect_iterator_adaptor over a vector of pointers to virtual
base classes is not possible although it should technically by possible


#include <boost/iterator_adaptors.hpp>
#include <vector>

class VBase
         virtual void foo() const = 0;


int main()
   typedef std::vector< VBase* > VBases;
   typedef boost::indirect_iterator_generator< VBases::const_iterator
>::type VBaseIterator;

   VBases container;
   VBaseIterator it( container.begin() );

does not compile (tried with gcc) because of

/usr/local/boost/boost/type_traits/conversion_traits.hpp:166: cannot declare
    variable `boost::is_convertible<VBase,
    boost::named_template_param_base>::_m_from' to be of type `VBase'

It does neither work when I declare the value_type to be a A& in the
indirect_iterator_generator (ref to ref problem) ?

Boost list run by bdawes at, gregod at, cpdaniel at, john at