Repository: mesos
Updated Branches:
  refs/heads/master 881fc7af9 -> 25cd4e5ec


Fixed compilation on VS 2017.

Review: https://reviews.apache.org/r/56781


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/25cd4e5e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/25cd4e5e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/25cd4e5e

Branch: refs/heads/master
Commit: 25cd4e5ec5a1e67874a35ff37f262911b2cf3508
Parents: 881fc7a
Author: Michael Park <[email protected]>
Authored: Thu Feb 16 16:01:50 2017 -0800
Committer: Michael Park <[email protected]>
Committed: Fri Feb 17 15:22:54 2017 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/future.hpp | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/25cd4e5e/3rdparty/libprocess/include/process/future.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/future.hpp 
b/3rdparty/libprocess/include/process/future.hpp
index 819ee5c..ec7ef22 100644
--- a/3rdparty/libprocess/include/process/future.hpp
+++ b/3rdparty/libprocess/include/process/future.hpp
@@ -396,9 +396,20 @@ private:
   }
 
 public:
+  // NOTE: There are two bugs we're dealing with here.
+  //   (1) GCC bug where the explicit use of `this->` is required in the
+  //       trailing return type: gcc.gnu.org/bugzilla/show_bug.cgi?id=57543
+  //   (2) VS 2017 RC bug where the explicit use of `this->` is disallowed.
+  //
+  // Since VS 2015 and 2017 RC both implement C++14's deduced return type for
+  // functions, we simply choose to use that on Windows.
+  //
+  // TODO(mpark): Remove the trailing return type once we get to C++14.
   template <typename F>
   auto then(F&& f) const
+#ifndef __WINDOWS__
     -> decltype(this->then(std::forward<F>(f), Prefer()))
+#endif // __WINDOWS__
   {
     return then(std::forward<F>(f), Prefer());
   }

Reply via email to