From 4756e5329255aa5181823f9ccde3d87162af7eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 27 Nov 2016 14:34:23 +0100 Subject: [PATCH] added some comments to explain the code --- Function.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Function.hpp b/Function.hpp index 1197f01..df71afc 100644 --- a/Function.hpp +++ b/Function.hpp @@ -3,15 +3,15 @@ -template +template // here Fun will be a function signature class Function; -template +template // specialization, so we can work class Function { private: - class callable_base + class callable_base // type-erasure magic for functors { public: virtual Ret call(Args...) const = 0; @@ -52,7 +52,7 @@ public: return *this; } - Function& operator=(std::nullptr_t) + Function& operator=(std::nullptr_t) // exploiting that decltype(nullptr) is std::nullptr_t { _is_null = true; } Ret operator()(Args... args) const