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 2017/03/16 21:11:12 UTC

[1/3] mesos git commit: Enabled `AsyncExecutorProcess::execute()` via a template parameter.

Repository: mesos
Updated Branches:
  refs/heads/master 09efd575e -> 10d6547d6


Enabled `AsyncExecutorProcess::execute()` via a template parameter.

This change moves the enabler from function parameter to template
parameter to simplify the function invocations.

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


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

Branch: refs/heads/master
Commit: 10d6547d648a3f26ab2ae77a48d9158bb24c2010
Parents: 1c2a077
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Thu Mar 16 13:04:51 2017 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Thu Mar 16 14:00:51 2017 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/async.hpp | 58 +++++++++++++---------
 1 file changed, 34 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/10d6547d/3rdparty/libprocess/include/process/async.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/async.hpp b/3rdparty/libprocess/include/process/async.hpp
index ac5e80f..f4af6c8 100644
--- a/3rdparty/libprocess/include/process/async.hpp
+++ b/3rdparty/libprocess/include/process/async.hpp
@@ -77,19 +77,21 @@ private:
   AsyncExecutorProcess(const AsyncExecutorProcess&);
   AsyncExecutorProcess& operator=(const AsyncExecutorProcess&);
 
-  template <typename F>
-  typename result_of<F()>::type execute(
-      const F& f,
-      typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
+  template <
+      typename F,
+      typename std::enable_if<
+          !std::is_void<typename result_of<F()>::type>::value, int>::type = 0>
+  typename result_of<F()>::type execute(const F& f)
   {
     terminate(self()); // Terminate process after function returns.
     return f();
   }
 
-  template <typename F>
-  Nothing execute(
-      const F& f,
-      typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
+  template <
+      typename F,
+      typename std::enable_if<
+          std::is_void<typename result_of<F()>::type>::value, int>::type = 0>
+  Nothing execute(const F& f)
   {
     terminate(self()); // Terminate process after function returns.
     f();
@@ -97,21 +99,29 @@ private:
   }
 
 #define TEMPLATE(Z, N, DATA)                                            \
-  template <typename F, ENUM_PARAMS(N, typename A)>                     \
+  template <                                                            \
+      typename F,                                                       \
+      ENUM_PARAMS(N, typename A),                                       \
+      typename std::enable_if<                                          \
+          !std::is_void<                                                \
+              typename result_of<F(ENUM_PARAMS(N, A))>::type>::value,   \
+          int>::type = 0>                                               \
   typename result_of<F(ENUM_PARAMS(N, A))>::type execute(       \
-      const F& f,                                                       \
-      ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+      const F& f, ENUM_BINARY_PARAMS(N, A, a))                          \
   {                                                                     \
     terminate(self()); /* Terminate process after function returns. */  \
     return f(ENUM_PARAMS(N, a));                                        \
   }                                                                     \
                                                                         \
-  template <typename F, ENUM_PARAMS(N, typename A)>                     \
+  template <                                                            \
+      typename F,                                                       \
+      ENUM_PARAMS(N, typename A),                                       \
+      typename std::enable_if<                                          \
+          std::is_void<                                                 \
+              typename result_of<F(ENUM_PARAMS(N, A))>::type>::value,   \
+          int>::type = 0>                                               \
   Nothing execute(                                                      \
-      const F& f,                                                       \
-      ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+      const F& f, ENUM_BINARY_PARAMS(N, A, a))                          \
   {                                                                     \
     terminate(self()); /* Terminate process after function returns. */  \
     f(ENUM_PARAMS(N, a));                                               \
@@ -171,10 +181,10 @@ private:
       typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
   {
     // Need to disambiguate overloaded method.
-    typename result_of<F()>::type(AsyncExecutorProcess::*method)(const F&, typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type*) = // NOLINT(whitespace/line_length)
+    typename result_of<F()>::type(AsyncExecutorProcess::*method)(const F&) =
       &AsyncExecutorProcess::execute<F>;
 
-    return dispatch(process, method, f, (void*) nullptr);
+    return dispatch(process, method, f);
   }
 
   template <typename F>
@@ -183,10 +193,10 @@ private:
       typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
   {
     // Need to disambiguate overloaded method.
-    Nothing(AsyncExecutorProcess::*method)(const F&, typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type*) = // NOLINT(whitespace/line_length)
+    Nothing(AsyncExecutorProcess::*method)(const F&) =
       &AsyncExecutorProcess::execute<F>;
 
-    return dispatch(process, method, f, (void*) nullptr);
+    return dispatch(process, method, f);
   }
 
 #define TEMPLATE(Z, N, DATA)                                            \
@@ -197,10 +207,10 @@ private:
       typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     /* Need to disambiguate overloaded method. */                       \
-    typename result_of<F(ENUM_PARAMS(N, A))>::type(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*) = /* NOLINT(whitespace/line_length) */ \
+    typename result_of<F(ENUM_PARAMS(N, A))>::type(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A)) = /* NOLINT(whitespace/line_length) */ \
       &AsyncExecutorProcess::execute<F, ENUM_PARAMS(N, A)>;             \
                                                                         \
-    return dispatch(process, method, f, ENUM_PARAMS(N, a), (void*) nullptr); \
+    return dispatch(process, method, f, ENUM_PARAMS(N, a));             \
   }                                                                     \
                                                                         \
   template <typename F, ENUM_PARAMS(N, typename A)>                     \
@@ -210,10 +220,10 @@ private:
       typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     /* Need to disambiguate overloaded method. */                       \
-    Nothing(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*) = /* NOLINT(whitespace/line_length) */ \
+    Nothing(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A)) = \
       &AsyncExecutorProcess::execute<F, ENUM_PARAMS(N, A)>;             \
                                                                         \
-    return dispatch(process, method, f, ENUM_PARAMS(N, a), (void*) nullptr); \
+    return dispatch(process, method, f, ENUM_PARAMS(N, a));             \
   }
 
   REPEAT_FROM_TO(1, 11, TEMPLATE, _) // Args A0 -> A9.


[3/3] mesos git commit: Replaced Boost Type Traits with STL in stout.

Posted by mp...@apache.org.
Replaced Boost Type Traits with STL in stout.

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


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

Branch: refs/heads/master
Commit: 09623fc4c5707b90f138d9f6c73b0368b58f60ce
Parents: 09efd57
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Thu Mar 16 13:00:22 2017 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Thu Mar 16 14:00:51 2017 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/json.hpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/09623fc4/3rdparty/stout/include/stout/json.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/json.hpp b/3rdparty/stout/include/stout/json.hpp
index be73340..aa581c0 100644
--- a/3rdparty/stout/include/stout/json.hpp
+++ b/3rdparty/stout/include/stout/json.hpp
@@ -30,8 +30,6 @@
 #include <type_traits>
 #include <vector>
 
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/utility/enable_if.hpp>
 #include <boost/variant.hpp>
 
 #include <stout/check.hpp>
@@ -257,7 +255,7 @@ struct Value : internal::Variant
   template <typename T>
   Value(
       const T& value,
-      typename boost::enable_if<boost::is_arithmetic<T>, int>::type = 0)
+      typename std::enable_if<std::is_arithmetic<T>::value, int>::type = 0)
     : internal::Variant(Number(value)) {}
 
   // Non-arithmetic types are passed to the default constructor of
@@ -265,7 +263,7 @@ struct Value : internal::Variant
   template <typename T>
   Value(
       const T& value,
-      typename boost::disable_if<boost::is_arithmetic<T>, int>::type = 0)
+      typename std::enable_if<!std::is_arithmetic<T>::value, int>::type = 0)
     : internal::Variant(value) {}
 
   template <typename T>


[2/3] mesos git commit: Replaced Boost Type Traits with STL in libprocess.

Posted by mp...@apache.org.
Replaced Boost Type Traits with STL in libprocess.

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


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

Branch: refs/heads/master
Commit: 1c2a077ec74f52aabda9bba2c5847469b311f4f4
Parents: 09623fc
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Thu Mar 16 13:01:27 2017 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Thu Mar 16 14:00:51 2017 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/async.hpp | 50 +++++++++++-----------
 1 file changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1c2a077e/3rdparty/libprocess/include/process/async.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/async.hpp b/3rdparty/libprocess/include/process/async.hpp
index a93eb58..ac5e80f 100644
--- a/3rdparty/libprocess/include/process/async.hpp
+++ b/3rdparty/libprocess/include/process/async.hpp
@@ -13,7 +13,7 @@
 #ifndef __ASYNC_HPP__
 #define __ASYNC_HPP__
 
-#include <boost/type_traits.hpp> // TODO(benh): Use C++11 type_traits.
+#include <type_traits>
 
 #include <process/dispatch.hpp>
 #include <process/future.hpp>
@@ -37,13 +37,13 @@ namespace process {
 template <typename F>
 Future<typename result_of<F()>::type> async(
     const F& f,
-    typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr); // NOLINT(whitespace/line_length)
+    typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type* = nullptr); // NOLINT(whitespace/line_length)
 
 
 template <typename F>
 Future<Nothing> async(
     const F& f,
-    typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr); // NOLINT(whitespace/line_length)
+    typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type* = nullptr); // NOLINT(whitespace/line_length)
 
 
 #define TEMPLATE(Z, N, DATA)                                            \
@@ -51,14 +51,14 @@ Future<Nothing> async(
   Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> async( \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr); /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr); /* NOLINT(whitespace/line_length) */ \
                                                                         \
                                                                         \
   template <typename F, ENUM_PARAMS(N, typename A)>                     \
   Future<Nothing> async(                                                \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr); // NOLINT(whitespace/line_length)
+      typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr); // NOLINT(whitespace/line_length)
 
   REPEAT_FROM_TO(1, 11, TEMPLATE, _) // Args A0 -> A9.
 #undef TEMPLATE
@@ -80,7 +80,7 @@ private:
   template <typename F>
   typename result_of<F()>::type execute(
       const F& f,
-      typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
+      typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
   {
     terminate(self()); // Terminate process after function returns.
     return f();
@@ -89,7 +89,7 @@ private:
   template <typename F>
   Nothing execute(
       const F& f,
-      typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
+      typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
   {
     terminate(self()); // Terminate process after function returns.
     f();
@@ -101,7 +101,7 @@ private:
   typename result_of<F(ENUM_PARAMS(N, A))>::type execute(       \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     terminate(self()); /* Terminate process after function returns. */  \
     return f(ENUM_PARAMS(N, a));                                        \
@@ -111,7 +111,7 @@ private:
   Nothing execute(                                                      \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     terminate(self()); /* Terminate process after function returns. */  \
     f(ENUM_PARAMS(N, a));                                               \
@@ -131,25 +131,25 @@ private:
   template <typename F>
   friend Future<typename result_of<F()>::type> async(
       const F& f,
-      typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type*); // NOLINT(whitespace/line_length)
+      typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type*); // NOLINT(whitespace/line_length)
 
   template <typename F>
   friend Future<Nothing> async(
       const F& f,
-      typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type*); // NOLINT(whitespace/line_length)
+      typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type*); // NOLINT(whitespace/line_length)
 
 #define TEMPLATE(Z, N, DATA)                                            \
   template <typename F, ENUM_PARAMS(N, typename A)>                     \
   friend Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> async( \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*); /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*); /* NOLINT(whitespace/line_length) */ \
                                                                         \
   template <typename F, ENUM_PARAMS(N, typename A)>                     \
   friend Future<Nothing> async(                                         \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*); // NOLINT(whitespace/line_length)
+      typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*); // NOLINT(whitespace/line_length)
 
   REPEAT_FROM_TO(1, 11, TEMPLATE, _) // Args A0 -> A9.
 #undef TEMPLATE
@@ -168,10 +168,10 @@ private:
   template <typename F>
   Future<typename result_of<F()>::type> execute(
       const F& f,
-      typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
+      typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
   {
     // Need to disambiguate overloaded method.
-    typename result_of<F()>::type(AsyncExecutorProcess::*method)(const F&, typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type*) = // NOLINT(whitespace/line_length)
+    typename result_of<F()>::type(AsyncExecutorProcess::*method)(const F&, typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type*) = // NOLINT(whitespace/line_length)
       &AsyncExecutorProcess::execute<F>;
 
     return dispatch(process, method, f, (void*) nullptr);
@@ -180,10 +180,10 @@ private:
   template <typename F>
   Future<Nothing> execute(
       const F& f,
-      typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
+      typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type* = nullptr) // NOLINT(whitespace/line_length)
   {
     // Need to disambiguate overloaded method.
-    Nothing(AsyncExecutorProcess::*method)(const F&, typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type*) = // NOLINT(whitespace/line_length)
+    Nothing(AsyncExecutorProcess::*method)(const F&, typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type*) = // NOLINT(whitespace/line_length)
       &AsyncExecutorProcess::execute<F>;
 
     return dispatch(process, method, f, (void*) nullptr);
@@ -194,10 +194,10 @@ private:
   Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> execute( \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     /* Need to disambiguate overloaded method. */                       \
-    typename result_of<F(ENUM_PARAMS(N, A))>::type(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) = /* NOLINT(whitespace/line_length) */ \
+    typename result_of<F(ENUM_PARAMS(N, A))>::type(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*) = /* NOLINT(whitespace/line_length) */ \
       &AsyncExecutorProcess::execute<F, ENUM_PARAMS(N, A)>;             \
                                                                         \
     return dispatch(process, method, f, ENUM_PARAMS(N, a), (void*) nullptr); \
@@ -207,10 +207,10 @@ private:
   Future<Nothing> execute(                                              \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     /* Need to disambiguate overloaded method. */                       \
-    Nothing(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) = /* NOLINT(whitespace/line_length) */ \
+    Nothing(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*) = /* NOLINT(whitespace/line_length) */ \
       &AsyncExecutorProcess::execute<F, ENUM_PARAMS(N, A)>;             \
                                                                         \
     return dispatch(process, method, f, ENUM_PARAMS(N, a), (void*) nullptr); \
@@ -227,7 +227,7 @@ private:
 template <typename F>
 Future<typename result_of<F()>::type> async(
     const F& f,
-    typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type*) // NOLINT(whitespace/line_length)
+    typename std::enable_if<!std::is_void<typename result_of<F()>::type>::value>::type*) // NOLINT(whitespace/line_length)
 {
   return AsyncExecutor().execute(f);
 }
@@ -236,7 +236,7 @@ Future<typename result_of<F()>::type> async(
 template <typename F>
 Future<Nothing> async(
     const F& f,
-    typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type*) // NOLINT(whitespace/line_length)
+    typename std::enable_if<std::is_void<typename result_of<F()>::type>::value>::type*) // NOLINT(whitespace/line_length)
 {
   return AsyncExecutor().execute(f);
 }
@@ -247,7 +247,7 @@ Future<Nothing> async(
   Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> async( \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<!std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     return AsyncExecutor().execute(f, ENUM_PARAMS(N, a));               \
   }                                                                     \
@@ -256,7 +256,7 @@ Future<Nothing> async(
   Future<Nothing> async(                                                \
       const F& f,                                                       \
       ENUM_BINARY_PARAMS(N, A, a),                                      \
-      typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) /* NOLINT(whitespace/line_length) */ \
+      typename std::enable_if<std::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>::value>::type*) /* NOLINT(whitespace/line_length) */ \
   {                                                                     \
     return AsyncExecutor().execute(f, ENUM_PARAMS(N, a));               \
   }