summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/NewKit/Function.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Kernel/NewKit/Function.hxx')
-rw-r--r--dev/Kernel/NewKit/Function.hxx53
1 files changed, 0 insertions, 53 deletions
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 <NewKit/Defines.hxx>
-
-namespace Kernel
-{
- template <typename T, typename... Args>
- 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 <typename... XArgs>
- T operator()(Args... args)
- {
- return fFn(args...);
- }
-
- template <typename... XArgs>
- 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__