You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/01/20 00:59:00 UTC
[4/4] mesos git commit: Invoked `_Deferred`'s `operator F()`
explicitly.
Invoked `_Deferred`'s `operator F()` explicitly.
Review: https://reviews.apache.org/r/41459
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b15161ee
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b15161ee
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b15161ee
Branch: refs/heads/master
Commit: b15161eea964c196276b51ef24763fee2f409d57
Parents: 0e968f8
Author: Michael Park <mp...@apache.org>
Authored: Tue Dec 15 02:54:56 2015 +0000
Committer: Michael Park <mp...@apache.org>
Committed: Tue Jan 19 15:51:56 2016 -0800
----------------------------------------------------------------------
3rdparty/libprocess/include/process/future.hpp | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b15161ee/3rdparty/libprocess/include/process/future.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/future.hpp b/3rdparty/libprocess/include/process/future.hpp
index bcb5668..280690c 100644
--- a/3rdparty/libprocess/include/process/future.hpp
+++ b/3rdparty/libprocess/include/process/future.hpp
@@ -170,31 +170,32 @@ public:
template <typename F>
const Future<T>& onDiscard(_Deferred<F>&& deferred) const
{
- return onDiscard(std::function<void()>(deferred));
+ return onDiscard(deferred.operator std::function<void()>());
}
template <typename F>
const Future<T>& onReady(_Deferred<F>&& deferred) const
{
- return onReady(std::function<void(const T&)>(deferred));
+ return onReady(deferred.operator std::function<void(const T&)>());
}
template <typename F>
const Future<T>& onFailed(_Deferred<F>&& deferred) const
{
- return onFailed(std::function<void(const std::string&)>(deferred));
+ return onFailed(
+ deferred.operator std::function<void(const std::string&)>());
}
template <typename F>
const Future<T>& onDiscarded(_Deferred<F>&& deferred) const
{
- return onDiscarded(std::function<void()>(deferred));
+ return onDiscarded(deferred.operator std::function<void()>());
}
template <typename F>
const Future<T>& onAny(_Deferred<F>&& deferred) const
{
- return onAny(std::function<void(const Future<T>&)>(deferred));
+ return onAny(deferred.operator std::function<void(const Future<T>&)>());
}
private:
@@ -327,13 +328,13 @@ private:
{
// note the then<X> is necessary to not have an infinite loop with
// then(F&& f)
- return then<X>(std::function<Future<X>(const T&)>(f));
+ return then<X>(f.operator std::function<Future<X>(const T&)>());
}
template <typename F, typename X = typename internal::unwrap<typename std::result_of<F()>::type>::type> // NOLINT(whitespace/line_length)
Future<X> then(_Deferred<F>&& f, LessPrefer) const
{
- return then<X>(std::function<Future<X>()>(f));
+ return then<X>(f.operator std::function<Future<X>()>());
}
template <typename F, typename X = typename internal::unwrap<typename std::result_of<F(const T&)>::type>::type> // NOLINT(whitespace/line_length)