Repository: trafficserver
Updated Branches:
  refs/heads/master b53c82d41 -> 7d2d7d359


Revert "Fixing small issue with cppapi and shared_ptr"

This reverts commit b53c82d411447af679873975bead5ad79f2f4ed2.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7d2d7d35
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7d2d7d35
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7d2d7d35

Branch: refs/heads/master
Commit: 7d2d7d3590b296402f7ba20808283401d68499f7
Parents: b53c82d
Author: Brian Geffon <bri...@apache.org>
Authored: Tue Sep 30 03:00:08 2014 -0700
Committer: Brian Geffon <bri...@apache.org>
Committed: Tue Sep 30 03:00:08 2014 -0700

----------------------------------------------------------------------
 .../src/include/atscppapi/shared_ptr.h          | 21 ++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7d2d7d35/lib/atscppapi/src/include/atscppapi/shared_ptr.h
----------------------------------------------------------------------
diff --git a/lib/atscppapi/src/include/atscppapi/shared_ptr.h 
b/lib/atscppapi/src/include/atscppapi/shared_ptr.h
index 014aae9..6fa9571 100644
--- a/lib/atscppapi/src/include/atscppapi/shared_ptr.h
+++ b/lib/atscppapi/src/include/atscppapi/shared_ptr.h
@@ -25,10 +25,27 @@
 #ifndef ASTCPPAPI_SHARED_PTR_H_
 #define ASTCPPAPI_SHARED_PTR_H_
 
-#include <memory>
+#include "ink_autoconf.h"
+
+#if HAVE_STD_SHARED_PTR
+#  include <memory>
+#else
+#  include <tr1/memory>
+#endif
 
 namespace atscppapi {
-using std::shared_ptr;
+
+/**
+ * Force the use of std::tr1::shared_ptr
+ * \todo Consider adding a simple macro to check if c++0x/11 is enabled
+ * and if so change it to std::shared_ptr and #include <memory>s
+ */
+#if HAVE_STD_SHARED_PTR
+  using std::shared_ptr;
+#else
+  using std::tr1::shared_ptr;
+#endif
+
 } /* atscppapi */
 
 #endif /* SHARED_PTR_H_ */

Reply via email to