Changeset 3569


Ignore:
Timestamp:
Jan 9, 2017, 4:43:08 AM (5 years ago)
Author:
Peter
Message:

std::iterator_traits<T>::value_type does not work on OSX when T is an
incrementable iterator (not single pass). As this must work for an
iterator that models concept Data Iterator, add single pass iterator
as an requirement, test for it in the concept check class (plus a few
more fixes) and turn off the test in
'test/weighted_iterator_archetype.cc'.

Location:
branches/0.14-stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/0.14-stable/doc/concepts.doxygen

    r3550 r3569  
    464464
    465465  - \c theplu::yat::utility::weighted_iterator_traits<I> must work
    466     well, which implies that iterator, \c I is a \readable_iterator.
     466    well, which implies that iterator, \c I is a \readable_iterator
     467    and \single_pass_iterator.
    467468
    468469\section concept_data_iterator_implementations Implementations
  • branches/0.14-stable/test/weighted_iterator_archetype.cc

    r3550 r3569  
    167167  // this is a compilation test - do not run
    168168  if (false) {
    169     test1<boost::incrementable_traversal_tag>();
     169    // On some systems std::iterator_traits<>::value_type does not
     170    // work, so we require concept Data Iterator to be single pass.
     171    //test1<boost::incrementable_traversal_tag>();
    170172    test1<boost::single_pass_traversal_tag>();
    171173    test1<boost::forward_traversal_tag>();
  • branches/0.14-stable/yat/utility/WeightedIteratorArchetype.h

    r3550 r3569  
    123123
    124124    TraversalCategory is one of the boost categories:
    125     boost::incrementable_traversal_tag
    126125    boost::single_pass_traversal_tag
    127126    boost::forward_traversal_tag
  • branches/0.14-stable/yat/utility/concept_check.h

    r3550 r3569  
    239239    BOOST_CONCEPT_USAGE(DataIteratorConcept)
    240240    {
    241       BOOST_CONCEPT_ASSERT((TrivialIterator<T>));
     241      BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<T>));
     242      BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<T>));
    242243      tag t;
    243244      constraints(t);
Note: See TracChangeset for help on using the changeset viewer.