Ignore:
Timestamp:
Jan 1, 2017, 5:56:44 AM (6 years ago)
Author:
Peter
Message:

The concept 'Distance' now requires that operator() works on iterator
that are readable and forward traversal, i.e., the previously implicit
requirement that iterator's reference type is lvalue is
dropped. closes #873

File:
1 edited

Legend:

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

    r3536 r3548  
    2727
    2828#include "iterator_traits.h"
     29#include "WeightedIteratorArchetype.h"
    2930
    3031#include <boost/concept_archetype.hpp>
    3132#include <boost/concept_check.hpp>
     33#include <boost/iterator/iterator_archetypes.hpp>
    3234#include <boost/iterator/iterator_concepts.hpp>
    3335
     
    281283    BOOST_CONCEPT_USAGE(DistanceConcept)
    282284    {
    283       boost::forward_iterator_archetype<double> unweighted;
    284       boost::forward_iterator_archetype<DataWeight> weighted;
     285      using boost::iterator_archetypes::readable_iterator_t;
     286      using boost::forward_traversal_tag;
     287      boost::iterator_archetype<double, readable_iterator_t,
     288                                forward_traversal_tag> unweighted;
     289      WeightedIteratorArchetype<readable_iterator_t, forward_traversal_tag>
     290        weighted;
    285291      double d=0;
    286292      d += distance_(unweighted, unweighted, unweighted);
Note: See TracChangeset for help on using the changeset viewer.