From 2c7f77483c5c1e83c0374d5c1e99ed98ed255988 Mon Sep 17 00:00:00 2001 From: Naios Date: Thu, 11 Jun 2015 17:52:19 +0200 Subject: [PATCH] add invalidate --- fluent/Continuable.h | 7 +++++++ test.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/fluent/Continuable.h b/fluent/Continuable.h index 3375caf..a861466 100644 --- a/fluent/Continuable.h +++ b/fluent/Continuable.h @@ -102,6 +102,13 @@ public: // TODO Transmute the returned callback here. return Continuable>(std::move(*this)); } + + /// Invalidates the Continuable + Continuable& invalidate() + { + _released = true; + return *this; + } }; namespace detail diff --git a/test.cpp b/test.cpp index 9ed71cb..93c9391 100644 --- a/test.cpp +++ b/test.cpp @@ -98,6 +98,8 @@ int main(int /*argc*/, char** /*argv*/) }); + cba1.invalidate(); + CastSpell(63362); std::vector myvec;