Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_meta_help.h
Go to the documentation of this file.
1
30#ifndef _RWSTD_RW_META_HELP_H_INCLUDED
31#define _RWSTD_RW_META_HELP_H_INCLUDED
32
33#include <rw/_defs.h>
34
36
37//
38// A compile-time integral constant wrapper. This class template
39// encapsulates an integer constant value for metaprogramming.
40//
41template <class _TypeT, _TypeT _Value>
42struct __rw_integral_constant
43{
44 typedef __rw_integral_constant<_TypeT,_Value> type;
45 typedef _TypeT value_type;
46
47 static const _TypeT value = _Value;
48};
49
50#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
51
52template<class _TypeT, _TypeT _Value>
53const _TypeT __rw_integral_constant<_TypeT, _Value>::value;
54
55#endif // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
56
57//
58// Synonym for __rw_integral_constant<bool, true> type.
59//
60typedef __rw_integral_constant<bool, true> __rw_true_type;
61
62//
63// Synonym for __rw_integral_constant<bool, false> type.
64//
65typedef __rw_integral_constant<bool, false> __rw_false_type;
66
67// convenience macros
68
69#define _RWSTD_BOOL_CONST(B) _RW::__rw_integral_constant<bool, B>
70
71} // namespace __rw
72
73
74#endif // _RWSTD_RW_META_HELP_H_INCLUDED
75
T value(const T &val)
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567