vector/aux_/at.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
3 #define BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
4 
5 // Copyright Aleksey Gurtovoy 2000-2004
6 //
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10 //
11 // See http://www.boost.org/libs/mpl for documentation.
12 
13 // $Id: at.hpp 13472 2017-08-22 07:53:44Z richean $
14 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
15 // $Revision: 13472 $
16 
17 #include <boost/mpl/at_fwd.hpp>
19 #include <boost/mpl/long.hpp>
20 #include <boost/mpl/void.hpp>
26 
27 namespace boost { namespace mpl {
28 
29 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
30 
31 template< typename Vector, long n_ >
32 struct v_at_impl
33 {
34  typedef long_< (Vector::lower_bound_::value + n_) > index_;
35  typedef __typeof__( Vector::item_(index_()) ) type;
36 };
37 
38 
39 template< typename Vector, long n_ >
40 struct v_at
41  : aux::wrapped_type< typename v_at_impl<Vector,n_>::type >
42 {
43 };
44 
45 template<>
46 struct at_impl< aux::vector_tag >
47 {
48  template< typename Vector, typename N > struct apply
49  : v_at<
50  Vector
51  , BOOST_MPL_AUX_VALUE_WKND(N)::value
52  >
53  {
54  };
55 };
56 
57 #else
58 
59 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
60  && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
61 
62 template< typename Vector, BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at;
63 
64 template< BOOST_MPL_AUX_NTTP_DECL(long, n_) >
65 struct at_impl< aux::vector_tag<n_> >
66 {
67  template< typename Vector, typename N > struct apply
68 #if !defined(__BORLANDC__)
69  : v_at<
70  Vector
71  , BOOST_MPL_AUX_VALUE_WKND(N)::value
72  >
73  {
74 #else
75  {
76  typedef typename v_at<
77  Vector
78  , BOOST_MPL_AUX_VALUE_WKND(N)::value
79  >::type type;
80 #endif
81  };
82 };
83 
84 # else
85 
86 namespace aux {
87 
88 template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at_impl
89 {
90  template< typename V > struct result_;
91 };
92 
93 // to work around ETI, etc.
94 template<> struct v_at_impl<-1>
95 {
96  template< typename V > struct result_
97  {
98  typedef void_ type;
99  };
100 };
101 
102 } // namespace aux
103 
104 template< typename T, BOOST_MPL_AUX_NTTP_DECL(long, n_) >
105 struct v_at
106  : aux::v_at_impl<n_>::template result_<T>
107 {
108 };
109 
110 # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
111 
112 #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES
113 
114 }}
115 
116 #endif // BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
long_
Definition: long_fwd.hpp:22
void_
Definition: void.hpp:29
boost::mpl::at_impl
Definition: at_fwd.hpp:19
ctps.hpp
boost::type
Definition: type.hpp:14
value_wknd.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
__typeof__
#define __typeof__
Definition: linux.hpp:98
type_wrapper.hpp
long.hpp
nttp_decl.hpp
tag.hpp
typeof.hpp
boost::mpl::apply
primary template (not a specialization!)
Definition: aux_/preprocessed/bcc/apply.hpp:163
void.hpp
at_fwd.hpp
boost::mpl::v_at
Definition: vector/aux_/at.hpp:62
BOOST_MPL_AUX_VALUE_WKND
#define BOOST_MPL_AUX_VALUE_WKND(C)
Definition: value_wknd.hpp:57


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