ReactOS  0.4.14-dev-323-g6fe6a88
boost_type_traits.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2004
4  * Francois Dumont
5  *
6  * This material is provided "as is", with absolutely no warranty expressed
7  * or implied. Any use is at your own risk.
8  *
9  * Permission to use or copy this software for any purpose is hereby granted
10  * without fee, provided the above notices are retained on all copies.
11  * Permission to modify the code and to distribute modified code is granted,
12  * provided the above notices are retained, and a notice that the code was
13  * modified is included with the above copyright notice.
14  *
15  */
16 
17 #ifndef _STLP_BOOST_TYPE_TRAITS_H
18 #define _STLP_BOOST_TYPE_TRAITS_H
19 
20 #ifndef BOOST_CONFIG_SUFFIX_HPP
21 # ifdef BOOST_CONFIG_HPP
22 # undef BOOST_CONFIG_HPP
23 # endif
24 # include <boost/config.hpp>
25 #endif
26 
27 #include <boost/type_traits/is_integral.hpp>
28 #include <boost/type_traits/is_float.hpp>
29 #include <boost/type_traits/has_trivial_constructor.hpp>
30 #include <boost/type_traits/has_trivial_copy.hpp>
31 #include <boost/type_traits/has_trivial_assign.hpp>
32 #include <boost/type_traits/has_trivial_destructor.hpp>
33 #include <boost/type_traits/is_pod.hpp>
34 #include <boost/type_traits/is_pointer.hpp>
35 #include <boost/type_traits/is_reference.hpp>
36 #include <boost/type_traits/remove_cv.hpp>
37 #include <boost/type_traits/is_same.hpp>
38 
39 /*
40  * This file mostly wraps boost type_traits in the STLport type_traits.
41  * When checking a type traits like trivial assign operator for instance
42  * both the boost value and STLport values has to be taken into account
43  * as we don't know what the user might have prefer, specializing the boost
44  * type traits or the STLport one.
45  */
47 
48 template <class _Tp> struct _IsRef {
50  typedef typename __bool2type<_Is>::_Ret _Ret;
51 };
52 
53 template <class _Tp> struct _IsPtr {
56 };
57 
58 template <class _Tp> struct _IsIntegral {
61 };
62 
63 template <class _Tp> struct _IsRational {
66 };
67 
68 template <class _Tp>
69 struct __type_traits {
72 
75 
78 
81 
84 };
85 
86 template <class _Tp1, class _Tp2>
87 struct _TrivialCopy {
90 
92  typedef typename __bool2type<same>::_Ret _Same;
93 
98 
100  static _Type _Answer() { return _Type(); }
101 };
102 
103 template <class _Tp1, class _Tp2>
107 
109  typedef typename __bool2type<same>::_Ret _Same;
110 
115 
117  static _Type _Answer() { return _Type(); }
118 };
119 
120 template <class _Tp>
128 
130 };
131 
132 template <class _Tp>
133 struct _TrivialInit {
135 
140 
142  typedef typename _Not<_Tr2>::_Ret _Tr3;
143 
144  typedef typename _Land2<_Tr1, _Tr3>::_Ret _Ret;
145  static _Ret _Answer() { return _Ret(); }
146 };
147 
149 
150 #endif /* _STLP_BOOST_TYPE_TRAITS_H */
_Lor2< _BoostTrivialCopy, _STLPTrivialCopy >::_Ret _TrivialCopy
__type_traits< uncv1 >::has_trivial_assignment_operator _STLPTrivialAssign
__bool2type< boost_trivial_copy >::_Ret _BoostTrivialCopy
__bool2type< pod >::_Ret is_POD_type
__bool2type< boost_trivial_assign >::_Ret _BoostTrivialAssign
_Land2< _Same, _TrivialAssign >::_Ret _Type
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
_Lor2< _BoostTrivialAssign, _STLPTrivialAssign >::_Ret _TrivialAssign
static _Type _Answer()
static _Type _Answer()
_Lor2< _BoostTrivialInit, _STLPTrivialInit >::_Ret _Tr1
static _Ret _Answer()
_Land2< _Same, _TrivialCopy >::_Ret _Type
__bool2type< same >::_Ret _Same
::boost::remove_cv< _Tp2 >::type uncv2
__bool2type< is_float >::_Ret _Ret
_Land2< _Tr1, _Tr3 >::_Ret _Ret
__type_traits< uncv1 >::has_trivial_copy_constructor _STLPTrivialCopy
__bool2type< is_integral >::_Ret _IsIntegral
__bool2type< boost_trivial_constructor >::_Ret _BoostTrivialInit
::boost::remove_cv< _Tp1 >::type uncv1
__bool2type< trivial_constructor >::_Ret has_trivial_default_constructor
_DefaultZeroValue< _Tp >::_Ret _Tr2
__bool2type< is_pointer >::_Ret _IsPointer
GLsizei const GLfloat * value
Definition: glext.h:6069
__bool2type< is_integral >::_Ret _Ret
__bool2type< is_pointer >::_Ret _Ret
_Not< _Tr2 >::_Ret _Tr3
__bool2type< trivial_assign >::_Ret has_trivial_assignment_operator
#define _STLP_END_NAMESPACE
Definition: features.h:503
::boost::remove_cv< _Tp1 >::type uncv1
__bool2type< trivial_copy >::_Ret has_trivial_copy_constructor
_Lor3< _IsIntegral, _IsFloat, _IsPointer >::_Ret _Ret
__bool2type< same >::_Ret _Same
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
::boost::remove_cv< _Tp >::type uncv
::boost::remove_cv< _Tp2 >::type uncv2
__bool2type< is_float >::_Ret _IsFloat
__bool2type< trivial_destructor >::_Ret has_trivial_destructor
__bool2type< _Is >::_Ret _Ret
__type_traits< uncv >::has_trivial_default_constructor _STLPTrivialInit