1
// Boost.Geometry Index
3
// Type-erased iterators
5
// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
7
// Use, modification and distribution is subject to the Boost Software License,
8
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9
// http://www.boost.org/LICENSE_1_0.txt)
11
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_TYPE_ERASED_ITERATORS_HPP
12
#define BOOST_GEOMETRY_INDEX_DETAIL_TYPE_ERASED_ITERATORS_HPP
14
#include <boost/type_erasure/any.hpp>
15
#include <boost/type_erasure/operators.hpp>
17
namespace boost { namespace geometry { namespace index { namespace detail {
19
template<typename T, typename ValueType, typename Reference, typename Pointer, typename DifferenceType>
20
struct single_pass_iterator_concept :
22
::boost::type_erasure::copy_constructible<T>,
23
::boost::type_erasure::equality_comparable<T>,
24
::boost::type_erasure::dereferenceable<Reference, T>,
25
::boost::type_erasure::assignable<T>,
26
::boost::type_erasure::incrementable<T>
30
template <typename ValueType, typename Reference, typename Pointer, typename DifferenceType>
31
struct single_pass_iterator_type
33
typedef ::boost::type_erasure::any<
34
single_pass_iterator_concept<
35
::boost::type_erasure::_self, ValueType, Reference, Pointer, DifferenceType
40
}}}} // namespace boost::geometry::index::detail
42
namespace boost { namespace type_erasure {
44
template<typename T, typename ValueType, typename Reference, typename Pointer, typename DifferenceType, typename Base>
45
struct concept_interface<
46
::boost::geometry::index::detail::single_pass_iterator_concept<
47
T, ValueType, Reference, Pointer, DifferenceType
51
typedef ValueType value_type;
52
typedef Reference reference;
53
typedef Pointer pointer;
54
typedef DifferenceType difference_type;
55
typedef ::std::input_iterator_tag iterator_category;
58
}} // namespace boost::type_erasure
60
#endif // BOOST_GEOMETRY_INDEX_DETAIL_TYPE_ERASED_ITERATORS_HPP