diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-16 10:05:50 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-16 10:08:17 +0100 |
| commit | c258c2e5fa9f5134dbc56f717ba37231a08a9081 (patch) | |
| tree | b2a2fd77e4672aa605fa3755e165fd16a93b53a5 /src/kernel/NeKit/Vettable.h | |
| parent | 3f7d7c7b64e4d731143f0d82cd52ded5c2fb091f (diff) | |
chore: kernel improvements and tweaks on the kernel.
- Two default domains:
- Computable domain, alias: Domain<T>.
- Non-Computable domain, alias: NullDomain.
- DiskSwap API improvements.
- Vettable Now returns the Result object instead of its value.
- Kernel shall not panic when `ptr_new` returns null.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/NeKit/Vettable.h')
| -rw-r--r-- | src/kernel/NeKit/Vettable.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/NeKit/Vettable.h b/src/kernel/NeKit/Vettable.h index fad1f06c..d79aaa0b 100644 --- a/src/kernel/NeKit/Vettable.h +++ b/src/kernel/NeKit/Vettable.h @@ -39,12 +39,12 @@ struct Vettable<IVettable> final { static constexpr bool kValue = true; }; -using FallbackType = bool (*)(bool type_value); +template <class Type> +using FallbackType = Void (*)(const PropertyResult<Type>& type_value); -/// @brief Concept version of Vettable. -template <typename Type, FallbackType OnFallback> +template <class Type, FallbackType<Type> OnFallback> concept IsVettable = requires() { - { Vettable<Type>::kValue ? TrueResult<Type>::kValue : OnFallback(PropertyResult<Type>::kValue) }; + { Vettable<Type>::kValue ? TrueResult<Type>{} : OnFallback(PropertyResult<Type>{}) }; }; } // namespace Kernel |
