3 // Copyright Neil Groves 2014. Use, modification and distribution is subject
4 // to the Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // For more information, see http://www.boost.org/libs/range
10 #ifndef BOOST_RANGE_UNIT_TEST_ADAPTOR_MOCK_ITERATOR_HPP_INCLUDED
11 #define BOOST_RANGE_UNIT_TEST_ADAPTOR_MOCK_ITERATOR_HPP_INCLUDED
13 #include <boost/iterator/iterator_facade.hpp>
22 template<typename TraversalTag>
24 : public boost::iterator_facade<
25 mock_iterator<TraversalTag>,
37 explicit mock_iterator(int value)
54 bool equal(const mock_iterator& other) const
56 return m_value == other.m_value;
59 void advance(std::ptrdiff_t offset)
64 std::ptrdiff_t distance_to(const mock_iterator& other) const
66 return other.m_value - m_value;
69 const int& dereference() const
75 friend class boost::iterator_core_access;
78 } // namespace unit_test
82 #endif // include guard