You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/11/16 02:39:20 UTC

[23/30] mesos git commit: Introduce std::enable_shared_from_this configure check in libprocess.

Introduce std::enable_shared_from_this configure check in libprocess.

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


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

Branch: refs/heads/master
Commit: 702b38240b9a596a4b46983da96ae9ca1c052b5d
Parents: 075859d
Author: Joris Van Remoortere <jo...@gmail.com>
Authored: Sat Nov 15 17:36:33 2014 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sat Nov 15 17:38:21 2014 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4 | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/702b3824/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 d48a96e..251213a 100644
--- a/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4
+++ b/3rdparty/libprocess/m4/ax_cxx_compile_stdcxx_11.m4
@@ -81,6 +81,19 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [
       // End scope of uniqueLock.
     }
   }
+
+  // Check for std::enable_shared_from_this.
+  struct SharedStruct : public std::enable_shared_from_this<SharedStruct>
+  {
+    std::shared_ptr<SharedStruct> get()
+    {
+      return shared_from_this();
+    }
+  };
+
+  // Construct a new shared_ptr using shared_from_this().
+  std::shared_ptr<SharedStruct> object =
+    std::shared_ptr<SharedStruct>(new SharedStruct())->get();
 ])
 
 AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [