common.hpp
Go to the documentation of this file.
1 // Boost.Range library
2 //
3 // Copyright Thorsten Ottosen 2003-2004. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see http://www.boost.org/libs/range/
9 //
10 
11 #ifndef BOOST_RANGE_DETAIL_COMMON_HPP
12 #define BOOST_RANGE_DETAIL_COMMON_HPP
13 
14 #if defined(_MSC_VER)
15 # pragma once
16 #endif
17 
18 #include <boost/range/config.hpp>
21 #include <boost/mpl/bool.hpp>
22 #include <boost/mpl/if.hpp>
23 #include <boost/mpl/int.hpp>
24 #include <boost/mpl/or.hpp>
25 #include <cstddef>
26 
28 // missing partial specialization workaround.
30 
31 namespace boost
32 {
33  namespace range_detail
34  {
35  // 1 = std containers
36  // 2 = std::pair
37  // 3 = const std::pair
38  // 4 = array
39  // 5 = const array
40  // 6 = char array
41  // 7 = wchar_t array
42  // 8 = char*
43  // 9 = const char*
44  // 10 = whar_t*
45  // 11 = const wchar_t*
46  // 12 = string
47 
48  typedef mpl::int_<1>::type std_container_;
49  typedef mpl::int_<2>::type std_pair_;
50  typedef mpl::int_<3>::type const_std_pair_;
51  typedef mpl::int_<4>::type array_;
52  typedef mpl::int_<5>::type const_array_;
53  typedef mpl::int_<6>::type char_array_;
54  typedef mpl::int_<7>::type wchar_t_array_;
55  typedef mpl::int_<8>::type char_ptr_;
56  typedef mpl::int_<9>::type const_char_ptr_;
57  typedef mpl::int_<10>::type wchar_t_ptr_;
58  typedef mpl::int_<11>::type const_wchar_t_ptr_;
59  typedef mpl::int_<12>::type string_;
60 
61  template< typename C >
62  struct range_helper
63  {
64  static C* c;
65  static C ptr;
66 
67  BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) );
68  BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
69  BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
70  BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
71  BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
72  BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) );
73  BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) );
74  BOOST_STATIC_CONSTANT( bool, is_string_ = (boost::mpl::or_<boost::mpl::bool_<is_const_char_ptr_>, boost::mpl::bool_<is_const_wchar_t_ptr_> >::value ));
76 
77  };
78 
79  template< typename C >
80  class range
81  {
84  void >::type pair_t;
109  public:
113  }; // class 'range'
114  }
115 }
116 
117 #endif
118 
boost::range_detail::array_
mpl::int_< 4 >::type array_
Definition: common.hpp:51
boost::range_detail::range
Definition: common.hpp:80
boost::range_detail::range::array_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_array_, boost::range_detail::array_, pair_t >::type array_t
Definition: common.hpp:87
boost::range_detail::range::type
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::is_void< char_array_t >::value, boost::range_detail::std_container_, char_array_t >::type type
Definition: common.hpp:112
boost::range_detail::range::wchar_ptr_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_wchar_t_ptr_, boost::range_detail::wchar_t_ptr_, const_wchar_ptr_t >::type wchar_ptr_t
Definition: common.hpp:102
boost::range_detail::is_wchar_t_array_impl
no_type is_wchar_t_array_impl(...)
boost::range_detail::const_std_pair_
mpl::int_< 3 >::type const_std_pair_
Definition: common.hpp:50
bool.hpp
boost::range_detail::wchar_t_ptr_
mpl::int_< 10 >::type wchar_t_ptr_
Definition: common.hpp:57
boost::range_detail::range::const_wchar_ptr_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_const_wchar_t_ptr_, boost::range_detail::const_wchar_t_ptr_, char_ptr_t >::type const_wchar_ptr_t
Definition: common.hpp:99
int.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::foreach_detail_::is_array_
boost::is_array< T > * is_array_(T const &)
Definition: foreach.hpp:218
boost::range_detail::range_helper::ptr
static C ptr
Definition: common.hpp:65
boost::range_detail::char_ptr_
mpl::int_< 8 >::type char_ptr_
Definition: common.hpp:55
boost::range_detail::range::pair_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_pair_, boost::range_detail::std_pair_, void >::type pair_t
Definition: common.hpp:84
boost::mpl::if_c
Definition: mpl/if.hpp:34
boost::range_detail::char_array_
mpl::int_< 6 >::type char_array_
Definition: common.hpp:53
boost::range_detail::const_array_
mpl::int_< 5 >::type const_array_
Definition: common.hpp:52
boost::range_detail::is_wchar_t_ptr_impl
no_type is_wchar_t_ptr_impl(...)
boost::range_detail::range_helper
Definition: common.hpp:62
boost::range_detail::range::char_ptr_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_char_ptr_, boost::range_detail::char_ptr_, const_char_ptr_t >::type char_ptr_t
Definition: common.hpp:96
boost::range_detail::range::const_char_ptr_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_const_char_ptr_, boost::range_detail::const_char_ptr_, string_t >::type const_char_ptr_t
Definition: common.hpp:93
boost::range_detail::const_wchar_t_ptr_
mpl::int_< 11 >::type const_wchar_t_ptr_
Definition: common.hpp:58
boost::range_detail::is_const_wchar_t_ptr_impl
no_type is_const_wchar_t_ptr_impl(...)
boost::range_detail::std_pair_
mpl::int_< 2 >::type std_pair_
Definition: common.hpp:49
boost::range_detail::is_pair_impl
no_type is_pair_impl(...)
boost::range_detail::const_char_ptr_
mpl::int_< 9 >::type const_char_ptr_
Definition: common.hpp:56
boost::mpl::or_
Definition: aux_/preprocessed/bcc/or.hpp:48
BOOST_RANGE_DEDUCED_TYPENAME
#define BOOST_RANGE_DEDUCED_TYPENAME
Definition: range/config.hpp:29
boost::range_detail::range_helper::BOOST_STATIC_CONSTANT
BOOST_STATIC_CONSTANT(bool, is_pair_=sizeof(boost::range_detail::is_pair_impl(c))==sizeof(yes_type))
boost::range_detail::range::string_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_string_, boost::range_detail::string_, array_t >::type string_t
Definition: common.hpp:90
boost::range_detail::is_char_array_impl
no_type is_char_array_impl(...)
is_void.hpp
boost::range_detail::is_const_char_ptr_impl
no_type is_const_char_ptr_impl(...)
boost::range_detail::range::char_array_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_char_array_, boost::range_detail::char_array_, wchar_array_t >::type char_array_t
Definition: common.hpp:108
sfinae.hpp
boost::range_detail::string_
mpl::int_< 12 >::type string_
Definition: common.hpp:59
boost::range_detail::std_container_
mpl::int_< 1 >::type std_container_
Definition: common.hpp:48
config.hpp
boost::range_detail::is_char_ptr_impl
no_type is_char_ptr_impl(...)
boost::is_array
Definition: is_array.hpp:25
if.hpp
boost::move_detail::yes_type
char yes_type
Definition: meta_utils.hpp:74
or.hpp
boost::range_detail::range::wchar_array_t
BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper< C >::is_wchar_t_array_, boost::range_detail::wchar_t_array_, wchar_ptr_t >::type wchar_array_t
Definition: common.hpp:105
boost::range_detail::range_helper::c
static C * c
Definition: common.hpp:64
boost::range_detail::wchar_t_array_
mpl::int_< 7 >::type wchar_t_array_
Definition: common.hpp:54


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