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>
22 #include <boost/mpl/if.hpp>
23 #include <boost/mpl/int.hpp>
24 #include <cstddef>
25 
27 // missing partial specialization workaround.
29 
30 namespace boost
31 {
32  namespace range_detail
33  {
34  // 1 = std containers
35  // 2 = std::pair
36  // 3 = const std::pair
37  // 4 = array
38  // 5 = const array
39  // 6 = char array
40  // 7 = wchar_t array
41  // 8 = char*
42  // 9 = const char*
43  // 10 = whar_t*
44  // 11 = const wchar_t*
45  // 12 = string
46 
59 
60  template< typename C >
61  struct range_helper
62  {
63  static C* c;
64  static C ptr;
65 
66  BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) );
67  BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
68  BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
69  BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
70  BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
71  BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) );
72  BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) );
75 
76  };
77 
78  template< typename C >
79  class range
80  {
83  void >::type pair_t;
86  pair_t >::type array_t;
89  array_t >::type string_t;
95  const_char_ptr_t >::type char_ptr_t;
101  const_wchar_ptr_t >::type wchar_ptr_t;
104  wchar_ptr_t >::type wchar_array_t;
107  wchar_array_t >::type char_array_t;
108  public:
111  char_array_t >::type type;
112  }; // class 'range'
113  }
114 }
115 
116 #endif
117 
mpl::int_< 12 >::type string_
Definition: common.hpp:58
mpl::int_< 2 >::type std_pair_
Definition: common.hpp:48
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:89
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:104
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
#define BOOST_RANGE_DEDUCED_TYPENAME
boost::is_array< T > * is_array_(T const &)
Definition: foreach.hpp:218
mpl::int_< 4 >::type array_
Definition: common.hpp:50
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:92
mpl::int_< 11 >::type const_wchar_t_ptr_
Definition: common.hpp:57
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:107
yes_type is_char_ptr_impl(char *const )
yes_type is_pair_impl(const std::pair< Iterator, Iterator > *)
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:86
mpl::int_< 5 >::type const_array_
Definition: common.hpp:51
mpl::int_< 1 >::type std_container_
Definition: common.hpp:47
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:95
mpl::int_< 10 >::type wchar_t_ptr_
Definition: common.hpp:56
yes_type is_const_char_ptr_impl(const char *const )
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:111
mpl::int_< 8 >::type char_ptr_
Definition: common.hpp:54
yes_type is_char_array_impl(char BOOST_RANGE_ARRAY_REF()[sz])
mpl::int_< 7 >::type wchar_t_array_
Definition: common.hpp:53
mpl::int_< 9 >::type const_char_ptr_
Definition: common.hpp:55
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:101
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:98
GLenum type
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:83
mpl::int_< 6 >::type char_array_
Definition: common.hpp:52
yes_type is_const_wchar_t_ptr_impl(const wchar_t *const )
BOOST_STATIC_CONSTANT(bool, is_pair_=sizeof(boost::range_detail::is_pair_impl(c))==sizeof(yes_type))
yes_type is_wchar_t_array_impl(wchar_t BOOST_RANGE_ARRAY_REF()[sz])
yes_type is_wchar_t_ptr_impl(wchar_t *const )
mpl::int_< 3 >::type const_std_pair_
Definition: common.hpp:49


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:12