~ai.tron/armagetronad/0.4-winlibs-updated

« back to all changes in this revision

Viewing changes to boost/includes/boost/geometry/index/detail/type_erased_iterators.hpp

  • Committer: Nik K.
  • Date: 2013-11-07 16:58:35 UTC
  • Revision ID: nik.karbaum@gmail.com-20131107165835-kq99jz23drfj4dkh
Forgot to add some files; here they are

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Boost.Geometry Index
 
2
//
 
3
// Type-erased iterators
 
4
//
 
5
// Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
 
6
//
 
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)
 
10
 
 
11
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_TYPE_ERASED_ITERATORS_HPP
 
12
#define BOOST_GEOMETRY_INDEX_DETAIL_TYPE_ERASED_ITERATORS_HPP
 
13
 
 
14
#include <boost/type_erasure/any.hpp>
 
15
#include <boost/type_erasure/operators.hpp>
 
16
 
 
17
namespace boost { namespace geometry { namespace index { namespace detail {
 
18
 
 
19
template<typename T, typename ValueType, typename Reference, typename Pointer, typename DifferenceType>
 
20
struct single_pass_iterator_concept :
 
21
    ::boost::mpl::vector<
 
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>
 
27
    >
 
28
{};
 
29
 
 
30
template <typename ValueType, typename Reference, typename Pointer, typename DifferenceType>
 
31
struct single_pass_iterator_type
 
32
{
 
33
    typedef ::boost::type_erasure::any<
 
34
        single_pass_iterator_concept<
 
35
            ::boost::type_erasure::_self, ValueType, Reference, Pointer, DifferenceType
 
36
        >
 
37
    > type;
 
38
};
 
39
 
 
40
}}}} // namespace boost::geometry::index::detail
 
41
 
 
42
namespace boost { namespace type_erasure {
 
43
 
 
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
 
48
    >, Base, T>
 
49
    : Base
 
50
{
 
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;
 
56
};
 
57
 
 
58
}} // namespace boost::type_erasure
 
59
 
 
60
#endif // BOOST_GEOMETRY_INDEX_DETAIL_TYPE_ERASED_ITERATORS_HPP