is_class.hpp
Go to the documentation of this file.
1 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
2 // Hinnant & John Maddock 2000-2003.
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6 //
7 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
8 
9 
10 #ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED
11 #define BOOST_TT_IS_CLASS_HPP_INCLUDED
12 
16 #ifndef BOOST_IS_CLASS
18 
19 #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
21 #else
27 #endif
28 
29 #endif // BOOST_IS_CLASS
30 
31 namespace boost {
32 
33 namespace detail {
34 
35 #ifndef BOOST_IS_CLASS
36 #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
37 
38 // This is actually the conforming implementation which works with
39 // abstract classes. However, enough compilers have trouble with
40 // it that most will use the one in
41 // boost/type_traits/object_traits.hpp. This implementation
42 // actually works with VC7.0, but other interactions seem to fail
43 // when we use it.
44 
45 // is_class<> metafunction due to Paul Mensonides
46 // (leavings@attbi.com). For more details:
47 // http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
48 #if defined(__GNUC__) && !defined(__EDG_VERSION__)
49 
50 template <class U> ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
51 template <class U> ::boost::type_traits::no_type is_class_tester(...);
52 
53 template <typename T>
54 struct is_class_impl
55 {
56 
58  sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
60  );
61 };
62 
63 #else
64 
65 template <typename T>
66 struct is_class_impl
67 {
68  template <class U> static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
69  template <class U> static ::boost::type_traits::no_type is_class_tester(...);
70 
72  sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
74  );
75 };
76 
77 #endif
78 
79 #else
80 
81 template <typename T>
83 {
91  );
92 };
93 
94 # endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
95 # else // BOOST_IS_CLASS
96 template <typename T>
97 struct is_class_impl
98 {
99  BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T));
100 };
101 # endif // BOOST_IS_CLASS
102 
103 } // namespace detail
104 
105 template <class T> struct is_class : public integral_constant<bool, ::boost::detail::is_class_impl<T>::value> {};
106 # ifdef __EDG_VERSION__
107 template <class T> struct is_class<const T> : public is_class<T>{};
108 template <class T> struct is_class<const volatile T> : public is_class<T>{};
109 template <class T> struct is_class<volatile T> : public is_class<T>{};
110 # endif
111 
112 } // namespace boost
113 
114 #endif // BOOST_TT_IS_CLASS_HPP_INCLUDED
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
GLfloat value
BOOST_STATIC_CONSTANT(bool, value=!::boost::is_union< T >::value >::value &&!::boost::is_scalar< T >::value &&!::boost::is_array< T >::value &&!::boost::is_reference< T >::value &&!::boost::is_void< T >::value &&!::boost::is_function< T >::value)
const char * detail


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