From da70596895d8135e08f8caac6978117697b4c021 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 18 Aug 2024 21:39:29 +0200 Subject: [REFACTOR] Improved project structure. Signed-off-by: Amlal El Mahrouss --- dev/Kernel/NewKit/Function.hxx | 53 ------------------------------------------ 1 file changed, 53 deletions(-) delete mode 100644 dev/Kernel/NewKit/Function.hxx (limited to 'dev/Kernel/NewKit/Function.hxx') diff --git a/dev/Kernel/NewKit/Function.hxx b/dev/Kernel/NewKit/Function.hxx deleted file mode 100644 index e54ff456..00000000 --- a/dev/Kernel/NewKit/Function.hxx +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _INC_FUNCTION_HPP__ -#define _INC_FUNCTION_HPP__ - -#include - -namespace Kernel -{ - template - class Function final - { - public: - Function() = default; - - public: - explicit Function(T (*Fn)(Args... args)) - : fFn(Fn) - { - } - - ~Function() = default; - - Function& operator=(const Function&) = default; - Function(const Function&) = default; - - template - T operator()(Args... args) - { - return fFn(args...); - } - - template - T Call(Args... args) - { - return fFn(args...); - } - - operator bool() - { - return fFn; - } - - bool operator!() - { - return !fFn; - } - - private: - T(*fFn) - (Args... args); - }; -} // namespace Kernel - -#endif // !_INC_FUNCTION_HPP__ -- cgit v1.2.3