Fixed the order of parameters of `is_specialization_of` in libprocess. Review: https://reviews.apache.org/r/65055
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ab519aaa Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ab519aaa Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ab519aaa Branch: refs/heads/master Commit: ab519aaa68bf71762c7d7f2f9aa7b6fb7b04a685 Parents: 3b0d1fa Author: Michael Park <[email protected]> Authored: Fri Jan 5 10:36:31 2018 -0800 Committer: Michael Park <[email protected]> Committed: Wed Jan 10 09:14:11 2018 -0800 ---------------------------------------------------------------------- 3rdparty/libprocess/include/process/future.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/ab519aaa/3rdparty/libprocess/include/process/future.hpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/include/process/future.hpp b/3rdparty/libprocess/include/process/future.hpp index 54fbbeb..2b8a059 100644 --- a/3rdparty/libprocess/include/process/future.hpp +++ b/3rdparty/libprocess/include/process/future.hpp @@ -1976,7 +1976,7 @@ struct UndiscardableDecorator typename std::decay<decltype(f(std::forward<Args>(args)...))>::type; static_assert( - is_specialization_of<Future, Result>::value, + is_specialization_of<Result, Future>::value, "Expecting Future<T> to be returned from undiscarded(...)"); return undiscardable(f(std::forward<Args>(args)...)); @@ -2000,11 +2000,10 @@ struct UndiscardableDecorator // This guarantees that even if `future` is discarded the discard will // not propagate into the lambda passed into `.then()`. template < - typename F, - typename std::enable_if< - !is_specialization_of< - Future, - typename std::decay<F>::type>::value, int>::type = 0> + typename F, + typename std::enable_if< + !is_specialization_of<typename std::decay<F>::type, Future>::value, + int>::type = 0> UndiscardableDecorator<typename std::decay<F>::type> undiscardable(F&& f) { return UndiscardableDecorator<
