]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
c++11: remove references to the std::tr1 namespace
authorCasey Bodley <cbodley@redhat.com>
Thu, 30 Jul 2015 20:26:26 +0000 (16:26 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 3 Aug 2015 15:16:13 +0000 (11:16 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/include/hash_namespace.h
src/include/memory.h
src/include/unordered_map.h
src/include/unordered_set.h
src/os/RocksDBStore.cc
src/os/RocksDBStore.h

index 59a4dff9145e2740a161d4d0f06c5ff3518425bd..5a3dbe8df2c20a44578de4821bc3ddfcc13734f0 100644 (file)
@@ -3,22 +3,10 @@
 
 #include <ciso646>
 
-#ifdef _LIBCPP_VERSION
-
 #include <functional>
 
 #define CEPH_HASH_NAMESPACE_START namespace std {
 #define CEPH_HASH_NAMESPACE_END }
 #define CEPH_HASH_NAMESPACE std
 
-#else
-
-#include <tr1/functional>
-
-#define CEPH_HASH_NAMESPACE_START namespace std { namespace tr1 {
-#define CEPH_HASH_NAMESPACE_END }}
-#define CEPH_HASH_NAMESPACE std::tr1
-
-#endif
-
 #endif
index 596627c9efb79ee6dd0bdd07e3c68d0a8d97a062..b829e48b682a63068177bf7f4e56bc8282f99de8 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef CEPH_MEMORY_H
 #define CEPH_MEMORY_H
 
-#include <ciso646>
-
-#ifdef _LIBCPP_VERSION
-
 #include <memory>
 
 namespace ceph {
@@ -13,16 +9,4 @@ namespace ceph {
   using std::static_pointer_cast;
 }
 
-#else
-
-#include <tr1/memory>
-
-namespace ceph {
-  using std::tr1::shared_ptr;
-  using std::tr1::weak_ptr;
-  using std::tr1::static_pointer_cast;
-}
-
-#endif
-
 #endif
index 30b09149a8132c2422bbf92bb08a5e9e53796b1c..0e48cfb0865ec8c6d669ce6c5c4a41eb0788ceee 100644 (file)
@@ -3,8 +3,6 @@
 
 #include <ciso646>
 
-#ifdef _LIBCPP_VERSION
-
 #include <unordered_map>
 
 namespace ceph {
@@ -12,15 +10,4 @@ namespace ceph {
   using std::unordered_multimap;
 }
 
-#else
-
-#include <tr1/unordered_map>
-
-namespace ceph {
-  using std::tr1::unordered_map;
-  using std::tr1::unordered_multimap;
-}
-
-#endif
-
 #endif
index 9b3b70b25d21f1973ef0e5c6ebc69b90e8348dd8..41a6c72270e5623abadc9dbb81a4e9f63e956f85 100644 (file)
@@ -3,22 +3,10 @@
 
 #include <ciso646>
 
-#ifdef _LIBCPP_VERSION
-
 #include <unordered_set>
 
 namespace ceph {
   using std::unordered_set;
 }
 
-#else
-
-#include <tr1/unordered_set>
-
-namespace ceph {
-  using std::tr1::unordered_set;
-}
-
-#endif
-
 #endif
index ad6022d09b702b7a281b7a6f0314d16c2bfadd9b..637ee619bbaa65bab8dd91596aa8c6aa5d0ed0fd 100644 (file)
@@ -4,7 +4,7 @@
 #include <set>
 #include <map>
 #include <string>
-#include <tr1/memory>
+#include <memory>
 #include <errno.h>
 
 #include "rocksdb/db.h"
@@ -491,7 +491,7 @@ string RocksDBStore::past_prefix(const string &prefix)
 
 RocksDBStore::WholeSpaceIterator RocksDBStore::_get_iterator()
 {
-  return std::tr1::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
+  return std::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
     new RocksDBWholeSpaceIteratorImpl(
       db->NewIterator(rocksdb::ReadOptions())
     )
@@ -506,7 +506,7 @@ RocksDBStore::WholeSpaceIterator RocksDBStore::_get_snapshot_iterator()
   snapshot = db->GetSnapshot();
   options.snapshot = snapshot;
 
-  return std::tr1::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
+  return std::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
     new RocksDBSnapshotIteratorImpl(db, snapshot,
       db->NewIterator(options))
   );
index 2955bea82cbdb2b0dfc2092c9bd48f153afea521..b7397cc7ad9cbf5bd12978de8d4ee1442bca0137 100644 (file)
@@ -9,7 +9,7 @@
 #include <set>
 #include <map>
 #include <string>
-#include <tr1/memory>
+#include <memory>
 #include <boost/scoped_ptr.hpp>
 
 #include <errno.h>
@@ -148,7 +148,7 @@ public:
   };
 
   KeyValueDB::Transaction get_transaction() {
-    return std::tr1::shared_ptr< RocksDBTransactionImpl >(
+    return std::shared_ptr< RocksDBTransactionImpl >(
       new RocksDBTransactionImpl(this));
   }