Ignore:
Timestamp:
Jul 16, 2008, 10:09:06 PM (13 years ago)
Author:
Peter
Message:

allow conversion in DataIterator? and WeightIterator?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/DataIterator.h

    r1376 r1377  
    5656
    5757    /**
     58       \brief Conversion constructor.
     59
     60       Create a DataIterator<Base> from a DataIterator<B2>. Possible
     61       if B2 is convertible to a Base. Constructor allows implicit
     62       conversions such as iterator to const_iterator.
     63     */
     64    template<typename B2>
     65    DataIterator(DataIterator<B2> other,
     66                 typename boost::enable_if_convertible<B2, Base>::type* = 0 )
     67      : DataIterator::iterator_adaptor_(other.base()) {}
     68
     69    /**
    5870       using iterator_traits::data on Base iterator
    5971
Note: See TracChangeset for help on using the changeset viewer.