Materialize the continuable before applying transforms

This commit is contained in:
Denis Blank 2017-10-04 16:56:56 +02:00
parent 92d247f2d6
commit 5c3ae8223a
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ public:
/// \since version 2.0.0
template <typename T>
auto apply(T&& transform) && {
return std::forward<T>(transform)(std::move(*this));
return std::forward<T>(transform)(std::move(*this).materialize());
}
/// The pipe operator | is an alias for the continuable::then method.

View File

@ -72,7 +72,7 @@ using unique_continuable = typename detail::unique_trait_of<
Args...
>::continuable;
/// Defines a non-copyable promise type which using the
/// Defines a non-copyable promise type which is using the
/// function2 backend for type erasure.
///
/// Usable like: `promise<int, float>`