Repository: mesos
Updated Branches:
  refs/heads/master dfd466cf1 -> 914be670f


Add configuration check to libprocess for std::unique_ptr and std::move

Review:


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

Branch: refs/heads/master
Commit: 914be670f554e3f91c21831fbf12d315baf34793
Parents: dfd466c
Author: Dominic Hamon <[email protected]>
Authored: Tue Oct 14 15:59:50 2014 -0700
Committer: Dominic Hamon <[email protected]>
Committed: Tue Oct 14 16:27:20 2014 -0700

----------------------------------------------------------------------
 .../libprocess/m4/ax_cxx_compile_stdcxx_11.m4   | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/914be670/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4 
b/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4
index 07b298f..bf2bd19 100644
--- a/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4
+++ b/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4
@@ -36,22 +36,32 @@
 #serial 3
 
 m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [
+  #include <memory>
+
   template <typename T>
     struct check
     {
       static_assert(sizeof(int) <= sizeof(T), "not big enough");
     };
 
-    typedef check<check<bool>> right_angle_brackets;
+  typedef check<check<bool>> right_angle_brackets;
+
+  int a;
+  decltype(a) b;
+
+  typedef check<int> check_type;
+  check_type c;
+  check_type&& cr = static_cast<check_type&&>(c);
 
-    int a;
-    decltype(a) b;
+  auto d = a;
 
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
+  int foo(std::unique_ptr<int> i)
+  {
+    return *i + 42;
+  }
 
-    auto d = a;
+  std::unique_ptr<int> i(new int());
+  int j = foo(std::move(i));
 ])
 
 AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [

Reply via email to