summaryrefslogtreecommitdiff
path: root/asl/base/defer.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-02-26 20:01:45 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-02-26 20:01:45 +0100
commit38ab48b1882f36ed7eb7e50c4fb46ce5d376fbc3 (patch)
tree63da65e8137f8f075ab33776d2a812bb31d86845 /asl/base/defer.hpp
parent8034ce643d36e8cbe4c4d6bc9e154aaf2eb08597 (diff)
Fix some deducing-this & functional stuff, add invocable concept
Diffstat (limited to 'asl/base/defer.hpp')
-rw-r--r--asl/base/defer.hpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/asl/base/defer.hpp b/asl/base/defer.hpp
index b6d52af..e881d8a 100644
--- a/asl/base/defer.hpp
+++ b/asl/base/defer.hpp
@@ -6,8 +6,7 @@
namespace asl
{
-// @Todo Add invokable check
-template<typename Callback>
+template<invocable Callback>
class DeferCallback
{
Callback m_callback;
@@ -36,8 +35,7 @@ public:
struct DeferFactory
{
- // @Todo Add invokable check
- template<typename Callback>
+ template<invocable Callback>
DeferCallback<Callback> operator<<(Callback&& callback) const
{
return DeferCallback<Callback>(ASL_FWD(callback));