Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_meta_cv.h
Go to the documentation of this file.
1
30#ifndef _RWSTD_RW_META_CV_H_INCLUDED
31#define _RWSTD_RW_META_CV_H_INCLUDED
32
33#include <rw/_defs.h>
34#include <rw/_meta_cat.h>
35#include <rw/_meta_comp.h>
36
38
39template <class _TypeT>
40struct __rw_remove_const
41{
42 typedef _TypeT type;
43};
44
45template <class _TypeT>
46struct __rw_remove_const<const _TypeT>
47{
48 typedef _TypeT type;
49};
50
51#define _RWSTD_REMOVE_CONST(T) _RW::__rw_remove_const<T>::type
52
53
54template <class _TypeT>
55struct __rw_remove_volatile
56{
57 typedef _TypeT type;
58};
59
60template <class _TypeT>
61struct __rw_remove_volatile<volatile _TypeT>
62{
63 typedef _TypeT type;
64};
65
66#define _RWSTD_REMOVE_VOLATILE(T) _RW::__rw_remove_volatile<T>::type
67
68template <class _TypeT>
69struct __rw_remove_cv
70{
71 typedef typename __rw_remove_const<
72 typename __rw_remove_volatile<_TypeT>::type
73 >::type type;
74};
75
76#define _RWSTD_REMOVE_CV(T) _RW::__rw_remove_cv<T>::type
77
78
79template <class _TypeT, bool = __rw_is_function<_TypeT>::value
80 || __rw_is_reference<_TypeT>::value>
81struct __rw_add_const_impl
82{
83 typedef _TypeT _C_type;
84};
85
86template <class _TypeT>
87struct __rw_add_const_impl<_TypeT, false>
88{
89 typedef const _TypeT _C_type;
90};
91
92template <class _TypeT>
93struct __rw_add_const
94{
95 typedef typename __rw_add_const_impl<_TypeT>::_C_type type;
96};
97
98#define _RWSTD_ADD_CONST(T) _RW::__rw_add_const<T>::type
99
100
101template <class _TypeT, bool = __rw_is_function<_TypeT>::value
102 || __rw_is_reference<_TypeT>::value>
103struct __rw_add_volatile_impl
104{
105 typedef _TypeT _C_type;
106};
107
108template <class _TypeT>
109struct __rw_add_volatile_impl<_TypeT, false>
110{
111 typedef volatile _TypeT _C_type;
112};
113
114template <class _TypeT>
115struct __rw_add_volatile
116{
117 typedef typename __rw_add_volatile_impl<_TypeT>::_C_type type;
118};
119
120#define _RWSTD_ADD_VOLATILE(T) _RW::__rw_add_volatile<T>::type
121
122
123template <class _TypeT>
124struct __rw_add_cv
125{
126 typedef typename
127 __rw_add_const<
128 typename __rw_add_volatile<_TypeT>::type
129 >::type type;
130};
131
132#define _RWSTD_ADD_CV(T) _RW::__rw_add_cv<T>::type
133
134} // namespace __rw
135
136
137#endif // _RWSTD_RW_META_CV_H_INCLUDED
138
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#define false
Definition stdbool.h:26