Changeset 3387


Ignore:
Timestamp:
Mar 16, 2015, 2:47:55 AM (8 years ago)
Author:
Peter
Message:

refs #803. MergeIterator?

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/merge_iterator.cc

    r2995 r3387  
    2424
    2525#include "yat/utility/MergeIterator.h"
     26
     27#include <boost/iterator/iterator_archetypes.hpp>
    2628
    2729#include <algorithm>
     
    112114
    113115
     116void test4(test::Suite& suite)
     117{
     118  // avoid running compilation test
     119  if (false) {
     120    typedef boost::less_than_comparable_archetype
     121      <boost::copy_constructible_archetype<> > value_type;
     122    typedef boost::iterator_archetypes::readable_iterator_t access_type;
     123    typedef boost::single_pass_traversal_tag traversal_type;
     124
     125    typedef boost::iterator_archetype<value_type, access_type, traversal_type>
     126      base;
     127    utility::MergeIterator<base> it;
     128    test::test_readable_iterator(it);
     129    test::test_single_pass_iterator(it);
     130  }
     131}
     132
     133
    114134int main(int argc, char* argv[])
    115135{
     
    118138  test2(suite);
    119139  test3(suite);
     140  test4(suite);
    120141  return suite.return_value();
    121142}
  • trunk/yat/utility/MergeIterator.h

    r3139 r3387  
    2727
    2828#include <boost/iterator/iterator_facade.hpp>
     29#include <boost/iterator/iterator_traits.hpp>
    2930
    3031#include <iterator>
     
    5556    : public boost::iterator_facade<
    5657    MergeIterator<Base, Compare>,
    57     const typename std::iterator_traits<Base>::value_type,
    58     std::input_iterator_tag
     58    typename boost::iterator_value<Base>::type,
     59    boost::single_pass_traversal_tag,
     60    typename boost::iterator_reference<Base>::type
    5961    >
    6062  {
Note: See TracChangeset for help on using the changeset viewer.