From 88ba45dd068ef6dc7ddc8e49c1726b4dcc70569d Mon Sep 17 00:00:00 2001 From: Naios Date: Sun, 9 Aug 2015 13:59:53 +0200 Subject: [PATCH] thoughts about a helper class --- mockup.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mockup.cpp b/mockup.cpp index c62d312..1e3b147 100644 --- a/mockup.cpp +++ b/mockup.cpp @@ -42,12 +42,26 @@ struct Continuable } }; +// helper class +struct Continuables +{ + static Continuable<> create_empty() + { + return make_continuable([](std::function&& callback) + { + callback(); + }); + } +}; + template Continuable<> make_continuable(Args&&...) { return Continuable<>(); } + + template Continuable<> operator&& (Continuable&&, Continuable&&) {