From 6b4d761818b79a6fc17607e15d939154b4d8314f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 15 Dec 2025 11:22:55 +0100 Subject: feat: New Nullable system, and improved Vettable system. Signed-off-by: Amlal El Mahrouss --- src/kernel/NeKit/Nullable.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/kernel/NeKit/Nullable.h (limited to 'src/kernel/NeKit/Nullable.h') diff --git a/src/kernel/NeKit/Nullable.h b/src/kernel/NeKit/Nullable.h new file mode 100644 index 00000000..c17009fc --- /dev/null +++ b/src/kernel/NeKit/Nullable.h @@ -0,0 +1,26 @@ +#ifndef __NE_KIT_NULLABLE_H__ +#define __NE_KIT_NULLABLE_H__ + +#include + +namespace Kernel { +template +struct IsDefined final { + using ResultType = Type; + using ResultTypeRef = Type&; + + static constexpr bool kValue = true; +}; + +template <> +struct IsDefined final { + static constexpr bool kValue = false; +}; + +template +concept IsAcceptable = requires() { + { IsDefined::kValue }; +}; +} // namespace Kernel + +#endif // !__NE_KIT_NULLABLE_H__ \ No newline at end of file -- cgit v1.2.3