From e002775e9240b6fdab182834aa3a3c392e7add8e Mon Sep 17 00:00:00 2001 From: Naios Date: Tue, 16 Jun 2015 16:25:53 +0200 Subject: [PATCH] some improvements --- fluent/Continuable.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fluent/Continuable.h b/fluent/Continuable.h index a96a9ff..8a831f6 100644 --- a/fluent/Continuable.h +++ b/fluent/Continuable.h @@ -186,7 +186,7 @@ namespace detail -> typename unary_chainer_t<_CTy>::result_t { // Transfer the insert function to the local scope. - // Also use it as an r-value reference to try to get move semantics with c++11. + // Also use it as an r-value reference to try to get move semantics with c++11 lambdas. ForwardFunction&& callback = std::move(_callback_insert); return typename unary_chainer_t<_CTy>::result_t( @@ -194,11 +194,9 @@ namespace detail { callback([functional, call_next](_ATy&&... args) mutable { - typename unary_chainer_t<_CTy>::result_t continuable = - unary_chainer_t<_CTy>::base::invoke(functional, std::forward<_ATy>(args)...); - // Invoke the next callback - continuable(std::move(call_next)); + unary_chainer_t<_CTy>::base::invoke(functional, std::forward<_ATy>(args)...) + (std::move(call_next)); }); }, std::move(*this));