From: Casey Bodley Date: Thu, 30 Jul 2015 20:26:26 +0000 (-0400) Subject: c++11: remove references to the std::tr1 namespace X-Git-Tag: v9.1.0~419^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2d18941f9d7e21c19fe33ea3b472532fdab3c035;p=ceph.git c++11: remove references to the std::tr1 namespace Signed-off-by: Casey Bodley --- diff --git a/src/include/hash_namespace.h b/src/include/hash_namespace.h index 59a4dff9145e..5a3dbe8df2c2 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 596627c9efb7..b829e48b682a 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 30b09149a813..0e48cfb0865e 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 9b3b70b25d21..41a6c72270e5 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 ad6022d09b70..637ee619bbaa 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 2955bea82cbd..b7397cc7ad9c 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)); }