pair_view.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
3 #define BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
4 
5 // Copyright David Abrahams 2003-2004
6 // Copyright Aleksey Gurtovoy 2004
7 //
8 // Distributed under the Boost Software License, Version 1.0.
9 // (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
11 //
12 // See http://www.boost.org/libs/mpl for documentation.
13 
14 // $Id: pair_view.hpp 13472 2017-08-22 07:53:44Z richean $
15 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
16 // $Revision: 13472 $
17 
18 #include <boost/mpl/begin_end.hpp>
20 #include <boost/mpl/advance.hpp>
21 #include <boost/mpl/distance.hpp>
22 #include <boost/mpl/next_prior.hpp>
23 #include <boost/mpl/deref.hpp>
24 #include <boost/mpl/min_max.hpp>
25 #include <boost/mpl/pair.hpp>
29 
30 namespace boost { namespace mpl {
31 
32 namespace aux {
33 struct pair_iter_tag;
34 
35 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
36 
37 template< typename Iter1, typename Iter2, typename Category >
38 struct pair_iter;
39 
40 template< typename Category > struct prior_pair_iter
41 {
42  template< typename Iter1, typename Iter2 > struct apply
43  {
44  typedef typename mpl::prior<Iter1>::type i1_;
45  typedef typename mpl::prior<Iter2>::type i2_;
46  typedef pair_iter<i1_,i2_,Category> type;
47  };
48 };
49 
50 template<> struct prior_pair_iter<forward_iterator_tag>
51 {
52  template< typename Iter1, typename Iter2 > struct apply
53  {
54  typedef pair_iter<Iter1,Iter2,forward_iterator_tag> type;
55  };
56 };
57 
58 #endif
59 }
60 
61 template<
62  typename Iter1
63  , typename Iter2
64  , typename Category
65  >
66 struct pair_iter
67 {
68  typedef aux::pair_iter_tag tag;
69  typedef Category category;
70  typedef Iter1 first;
71  typedef Iter2 second;
72 
73 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
74  typedef pair<
75  typename deref<Iter1>::type
76  , typename deref<Iter2>::type
77  > type;
78 
79  typedef typename mpl::next<Iter1>::type i1_;
80  typedef typename mpl::next<Iter2>::type i2_;
82 
84 #endif
85 };
86 
87 
88 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
89 
90 template< typename Iter1, typename Iter2, typename C >
91 struct deref< pair_iter<Iter1,Iter2,C> >
92 {
93  typedef pair<
94  typename deref<Iter1>::type
95  , typename deref<Iter2>::type
96  > type;
97 };
98 
99 template< typename Iter1, typename Iter2, typename C >
100 struct next< pair_iter<Iter1,Iter2,C> >
101 {
102  typedef typename mpl::next<Iter1>::type i1_;
103  typedef typename mpl::next<Iter2>::type i2_;
105 };
106 
107 template< typename Iter1, typename Iter2, typename C >
108 struct prior< pair_iter<Iter1,Iter2,C> >
109 {
110  typedef typename mpl::prior<Iter1>::type i1_;
111  typedef typename mpl::prior<Iter2>::type i2_;
113 };
114 
115 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
116 
117 
118 template<> struct advance_impl<aux::pair_iter_tag>
119 {
120  template< typename Iter, typename D > struct apply
121  {
125  };
126 };
127 
128 template<> struct distance_impl<aux::pair_iter_tag>
129 {
130  template< typename Iter1, typename Iter2 > struct apply
131  {
132  // agurt, 10/nov/04: MSVC 6.5 ICE-s on forwarding
133  typedef typename mpl::distance<
134  typename first<Iter1>::type
135  , typename first<Iter2>::type
137  };
138 };
139 
140 
141 template<
142  typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
143  , typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
144  >
145 struct pair_view
146 {
147  typedef nested_begin_end_tag tag;
148 
149  typedef typename begin<Sequence1>::type iter1_;
150  typedef typename begin<Sequence2>::type iter2_;
151  typedef typename min<
155 
157 
158  typedef pair_iter<
159  typename end<Sequence1>::type
160  , typename end<Sequence2>::type
161  , category_
162  > end;
163 };
164 
166 
167 }}
168 
169 #endif // BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
boost::mpl::prior< pair_iter< Iter1, Iter2, C > >::i1_
mpl::prior< Iter1 >::type i1_
Definition: pair_view.hpp:110
boost::mpl::advance_impl< aux::pair_iter_tag >::apply::i1_
mpl::advance< typename Iter::first, D >::type i1_
Definition: pair_view.hpp:122
boost::mpl::pair_view::end
pair_iter< typename end< Sequence1 >::type, typename end< Sequence2 >::type, category_ > end
Definition: pair_view.hpp:162
boost::mpl::distance_impl
Definition: distance.hpp:34
iterator_category.hpp
boost::mpl::advance_impl
Definition: advance.hpp:34
ctps.hpp
BOOST_MPL_AUX_NA_PARAM
#define BOOST_MPL_AUX_NA_PARAM(param)
Definition: na_spec.hpp:152
boost::mpl::begin::type
begin_impl< tag_ >::template apply< Sequence >::type type
Definition: begin_end.hpp:35
next_prior.hpp
na_spec.hpp
boost::mpl::pair_view::category_
min< typename iterator_category< iter1_ >::type, typename iterator_category< iter2_ >::type >::type category_
Definition: pair_view.hpp:154
min_max.hpp
boost::mpl::next< pair_iter< Iter1, Iter2, C > >::i2_
mpl::next< Iter2 >::type i2_
Definition: pair_view.hpp:103
boost::type
Definition: type.hpp:14
boost::mpl::pair_iter::tag
aux::pair_iter_tag tag
Definition: pair_view.hpp:68
BOOST_MPL_AUX_NA_SPEC
#define BOOST_MPL_AUX_NA_SPEC(i, name)
Definition: na_spec.hpp:161
boost::mpl::deref
Definition: deref.hpp:27
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::mpl::end::type
end_impl< tag_ >::template apply< Sequence >::type type
Definition: begin_end.hpp:47
boost::mpl::prior< pair_iter< Iter1, Iter2, C > >::type
pair_iter< i1_, i2_, C > type
Definition: pair_view.hpp:112
boost::mpl::deref< pair_iter< Iter1, Iter2, C > >::type
pair< typename deref< Iter1 >::type, typename deref< Iter2 >::type > type
Definition: pair_view.hpp:96
boost::mpl::pair_iter::category
Category category
Definition: pair_view.hpp:69
boost::mpl::pair_view
Definition: pair_view.hpp:145
distance.hpp
boost::mpl::pair_iter::first
Iter1 first
Definition: pair_view.hpp:70
boost::mpl::advance_impl< aux::pair_iter_tag >::apply::type
pair_iter< i1_, i2_, typename Iter::category > type
Definition: pair_view.hpp:124
boost::mpl::pair
Definition: pair.hpp:28
deref.hpp
boost::mpl::pair_view::iter2_
begin< Sequence2 >::type iter2_
Definition: pair_view.hpp:150
boost::mpl::pair_iter
Definition: pair_view.hpp:66
boost::mpl::prior::type
T::prior type
Definition: mpl/next_prior.hpp:40
begin_end.hpp
boost::mpl::next::type
T::next type
Definition: mpl/next_prior.hpp:31
boost::mpl::apply
primary template (not a specialization!)
Definition: aux_/preprocessed/bcc/apply.hpp:163
boost::mpl::next< pair_iter< Iter1, Iter2, C > >::type
pair_iter< i1_, i2_, C > type
Definition: pair_view.hpp:104
boost::mpl::distance_impl< aux::pair_iter_tag >::apply::type
mpl::distance< typename first< Iter1 >::type, typename first< Iter2 >::type >::type type
Definition: pair_view.hpp:136
iterator_tags.hpp
boost::next
T next(T x)
Definition: next_prior.hpp:146
boost::mpl::apply_wrap2
Definition: aux_/preprocessed/bcc/apply_wrap.hpp:301
boost::mpl::distance
Definition: distance.hpp:67
boost::mpl::iterator_category::type
Iterator::category type
Definition: iterator_category.hpp:27
boost::mpl::next
Definition: mpl/next_prior.hpp:29
boost::mpl::min
Definition: min_max.hpp:27
boost::mpl::pair_iter::second
Iter2 second
Definition: pair_view.hpp:71
boost::mpl::pair_view::iter1_
begin< Sequence1 >::type iter1_
Definition: pair_view.hpp:149
boost::mpl::prior
Definition: mpl/next_prior.hpp:38
boost::mpl::pair_view::begin
pair_iter< iter1_, iter2_, category_ > begin
Definition: pair_view.hpp:156
boost::mpl::first::type
P::first type
Definition: pair.hpp:43
boost::mpl::prior< pair_iter< Iter1, Iter2, C > >::i2_
mpl::prior< Iter2 >::type i2_
Definition: pair_view.hpp:111
boost::prior
T prior(T x)
Definition: next_prior.hpp:155
boost::mpl::deref::type
Iterator::type type
Definition: deref.hpp:30
boost::mpl::advance_impl< aux::pair_iter_tag >::apply::i2_
mpl::advance< typename Iter::second, D >::type i2_
Definition: pair_view.hpp:123
boost::mpl::advance
Definition: advance.hpp:56
advance.hpp
boost::mpl::pair_view::tag
nested_begin_end_tag tag
Definition: pair_view.hpp:147
pair.hpp
boost::mpl::next< pair_iter< Iter1, Iter2, C > >::i1_
mpl::next< Iter1 >::type i1_
Definition: pair_view.hpp:102


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:45:46