Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_meta_comp.h
Go to the documentation of this file.
1
30#ifndef _RWSTD_RW_META_COMP_H_INCLUDED
31#define _RWSTD_RW_META_COMP_H_INCLUDED
32
33#include <rw/_defs.h>
34#include <rw/_meta_cat.h>
35
37
38template <class _TypeT>
39struct __rw_is_reference
40 : __rw_integral_constant<bool,
41 __rw_is_lvalue_reference<_TypeT>::value
42 || __rw_is_rvalue_reference<_TypeT>::value>
43{
44};
45
46#define _RWSTD_IS_REFERENCE(T) _RW::__rw_is_reference<T>::value
47
48template <class _TypeT>
49struct __rw_is_arithmetic
50 : __rw_integral_constant<bool,
51 __rw_is_integral<_TypeT>::value
52 || __rw_is_floating_point<_TypeT>::value>
53{
54};
55
56#define _RWSTD_IS_ARITHMETIC(T) _RW::__rw_is_arithmetic<T>::value
57
58template <class _TypeT>
59struct __rw_is_fundamental
60 : __rw_integral_constant<bool, __rw_is_void<_TypeT>::value
61 || __rw_is_arithmetic<_TypeT>::value>
62{
63};
64
65#define _RWSTD_IS_FUNDAMENTAL(T) _RW::__rw_is_fundamental<T>::value
66
67
68template <class _TypeT>
69struct __rw_is_object
70 : __rw_integral_constant<bool, !__rw_is_function<_TypeT>::value
71 && !__rw_is_reference<_TypeT>::value
72 && !__rw_is_void<_TypeT>::value>
73{
74};
75
76#define _RWSTD_IS_OBJECT(T) _RW::__rw_is_object<T>::value
77
78
79template <class _TypeT>
80struct __rw_is_member_pointer
81 : __rw_integral_constant<bool,
82 __rw_is_member_function_pointer<_TypeT>::value
83 || __rw_is_member_object_pointer<_TypeT>::value>
84{
85};
86
87#define _RWSTD_IS_MEMBER_POINTER(T) _RW::__rw_is_member_pointer<T>::value
88
89template <class _TypeT>
90struct __rw_is_scalar
91 : __rw_integral_constant<bool, __rw_is_arithmetic<_TypeT>::value
92 || __rw_is_enum<_TypeT>::value
93 || __rw_is_pointer<_TypeT>::value
94 || __rw_is_member_pointer<_TypeT>::value>
95{
96 // todo need to handle special case
97 //
98 // __rw_is_same<std::nullptr_t, __rw_remove_cv<_TypeT>::type>::value
99};
100
101#define _RWSTD_IS_SCALAR(T) _RW::__rw_is_scalar<T>::value
102
103
104template <class _TypeT>
105struct __rw_is_compound
106 : __rw_integral_constant<bool, __rw_is_array<_TypeT>::value
107 || __rw_is_function<_TypeT>::value
108 || __rw_is_pointer<_TypeT>::value
109 || __rw_is_reference<_TypeT>::value
110 || __rw_is_class<_TypeT>::value
111 || __rw_is_union<_TypeT>::value
112 || __rw_is_enum<_TypeT>::value
113 || __rw_is_member_pointer<_TypeT>::value>
114{
115};
116
117#define _RWSTD_IS_COMPOUND(T) _RW::__rw_is_compound<T>::value
118
119
120} // namespace __rw
121
122
123#endif // _RWSTD_RW_META_COMP_H_INCLUDED
124
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567