1#ifndef NE_STL_INCLUDENE_STL_PUBLIC_H
2#define NE_STL_INCLUDENE_STL_PUBLIC_H
13#define INVALID_HANDLE ((nstd::handle_t)0)
19template <
typename TContext, handle_t _max_handle_value, handle_t _base_handle_value>
22 static handle_t _current_handle_value{_base_handle_value};
25 if (_current_handle_value >= _max_handle_value) {
26 _current_handle_value = _base_handle_value;
28 return ++_current_handle_value;
33 template <
typename TEnum>
34 static TEnum
v(int32_t _i_v) {
41 template <
typename TEnum>
42 static int32_t
v(TEnum _e_v) {
51template <typename TEnum, typename TIntegral, typename nstd::enable_if<std::is_integral<TIntegral>::value, std::nullptr_t>::type =
nullptr>
59template <
typename TEnum>
68template <
typename T,
size_t N>
70#define arraysize(array) (sizeof(ArraySizeHelper(array)))
Definition ne_stl_spinlock.h:61
Definition ne_stl_spinlock.h:44
Definition ne_stl_any.h:7
char(& ArraySizeHelper(T(&array)[N]))[N]
TEnum & enum_cast(const TIntegral &_i_v)
Definition ne_stl_tool.h:52
uint32_t handle_t
Definition ne_stl_tool.h:11
_integral_constant< T, _value > integral_constant
Definition ne_stl_type_traits.h:15
Definition ne_stl_tool.h:32
static int32_t v(TEnum _e_v)
Definition ne_stl_tool.h:42
static TEnum v(int32_t _i_v)
Definition ne_stl_tool.h:34
Definition ne_stl_tool.h:10
Definition ne_stl_tool.h:20
static handle_t generate()
Definition ne_stl_tool.h:21