blob: 534d6901e5bc3ec5abc15d85d6cd398aa63fc4a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* ========================================
Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
======================================== */
#ifndef __NE_KIT_DOMAIN_H__
#define __NE_KIT_DOMAIN_H__
#include <NeKit/Config.h>
namespace Kernel {
template <class Type>
struct IsDefined final {
using ResultType = Type;
using ResultTypeRef = Type&;
using TypeRef = ResultTypeRef;
using ConstType = const Type&;
using TypePtr = Type*;
static constexpr bool kValue = true;
};
template <>
struct IsDefined<nullPtr> final {
static constexpr bool kValue = false;
};
using NullDomain = IsDefined<nullPtr>;
template <class Type>
using Domain = IsDefined<Type>;
} // namespace Kernel
#endif // !__NE_KIT_DOMAIN_H__
|