From 2d18941f9d7e21c19fe33ea3b472532fdab3c035 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 30 Jul 2015 16:26:26 -0400 Subject: [PATCH] c++11: remove references to the std::tr1 namespace Signed-off-by: Casey Bodley --- src/include/hash_namespace.h | 12 ------------ src/include/memory.h | 16 ---------------- src/include/unordered_map.h | 13 ------------- src/include/unordered_set.h | 12 ------------ src/os/RocksDBStore.cc | 6 +++--- src/os/RocksDBStore.h | 4 ++-- 6 files changed, 5 insertions(+), 58 deletions(-) diff --git a/src/include/hash_namespace.h b/src/include/hash_namespace.h index 59a4dff9145e2..5a3dbe8df2c20 100644 --- a/src/include/hash_namespace.h +++ b/src/include/hash_namespace.h @@ -3,22 +3,10 @@ #include -#ifdef _LIBCPP_VERSION - #include #define CEPH_HASH_NAMESPACE_START namespace std { #define CEPH_HASH_NAMESPACE_END } #define CEPH_HASH_NAMESPACE std -#else - -#include - -#define CEPH_HASH_NAMESPACE_START namespace std { namespace tr1 { -#define CEPH_HASH_NAMESPACE_END }} -#define CEPH_HASH_NAMESPACE std::tr1 - -#endif - #endif diff --git a/src/include/memory.h b/src/include/memory.h index 596627c9efb79..b829e48b682a6 100644 --- a/src/include/memory.h +++ b/src/include/memory.h @@ -1,10 +1,6 @@ #ifndef CEPH_MEMORY_H #define CEPH_MEMORY_H -#include - -#ifdef _LIBCPP_VERSION - #include namespace ceph { @@ -13,16 +9,4 @@ namespace ceph { using std::static_pointer_cast; } -#else - -#include - -namespace ceph { - using std::tr1::shared_ptr; - using std::tr1::weak_ptr; - using std::tr1::static_pointer_cast; -} - -#endif - #endif diff --git a/src/include/unordered_map.h b/src/include/unordered_map.h index 30b09149a8132..0e48cfb0865ec 100644 --- a/src/include/unordered_map.h +++ b/src/include/unordered_map.h @@ -3,8 +3,6 @@ #include -#ifdef _LIBCPP_VERSION - #include namespace ceph { @@ -12,15 +10,4 @@ namespace ceph { using std::unordered_multimap; } -#else - -#include - -namespace ceph { - using std::tr1::unordered_map; - using std::tr1::unordered_multimap; -} - -#endif - #endif diff --git a/src/include/unordered_set.h b/src/include/unordered_set.h index 9b3b70b25d21f..41a6c72270e56 100644 --- a/src/include/unordered_set.h +++ b/src/include/unordered_set.h @@ -3,22 +3,10 @@ #include -#ifdef _LIBCPP_VERSION - #include namespace ceph { using std::unordered_set; } -#else - -#include - -namespace ceph { - using std::tr1::unordered_set; -} - -#endif - #endif diff --git a/src/os/RocksDBStore.cc b/src/os/RocksDBStore.cc index ad6022d09b702..637ee619bbaa6 100644 --- a/src/os/RocksDBStore.cc +++ b/src/os/RocksDBStore.cc @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #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( + return std::shared_ptr( 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( + return std::shared_ptr( new RocksDBSnapshotIteratorImpl(db, snapshot, db->NewIterator(options)) ); diff --git a/src/os/RocksDBStore.h b/src/os/RocksDBStore.h index 2955bea82cbdb..b7397cc7ad9cb 100644 --- a/src/os/RocksDBStore.h +++ b/src/os/RocksDBStore.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include @@ -148,7 +148,7 @@ public: }; KeyValueDB::Transaction get_transaction() { - return std::tr1::shared_ptr< RocksDBTransactionImpl >( + return std::shared_ptr< RocksDBTransactionImpl >( new RocksDBTransactionImpl(this)); } -- 2.39.5