[all] Switch from boost::shared_ptr -> std::shared_ptr.

Shared_ptr has moved into the standard library since these tools were
first written.
This commit is contained in:
Joe Thornber
2020-04-30 15:02:43 +01:00
parent e801cc607b
commit 4313469475
40 changed files with 78 additions and 94 deletions

View File

@@ -75,7 +75,7 @@ namespace persistent_data {
};
struct damage {
typedef boost::shared_ptr<damage> ptr;
typedef std::shared_ptr<damage> ptr;
damage(run<uint32_t> lost_keys,
std::string const &desc)
@@ -222,7 +222,7 @@ namespace persistent_data {
typedef array_block<ValueTraits, block_manager::write_ref> wblock;
typedef array_block<ValueTraits, block_manager::read_ref> rblock;
typedef boost::shared_ptr<array<ValueTraits> > ptr;
typedef std::shared_ptr<array<ValueTraits> > ptr;
typedef typename ValueTraits::value_type value_type;
typedef typename ValueTraits::ref_counter ref_counter;

View File

@@ -36,7 +36,7 @@ namespace persistent_data {
template <typename ValueTraits, typename RefType>
class array_block {
public:
typedef boost::shared_ptr<array_block> ptr;
typedef std::shared_ptr<array_block> ptr;
typedef typename ValueTraits::disk_type disk_type;
typedef typename ValueTraits::value_type value_type;
typedef typename ValueTraits::ref_counter ref_counter;

View File

@@ -30,7 +30,7 @@ namespace persistent_data {
class bitset_impl {
public:
typedef boost::shared_ptr<bitset_impl> ptr;
typedef std::shared_ptr<bitset_impl> ptr;
typedef persistent_data::transaction_manager::ptr tm_ptr;
bitset_impl(transaction_manager &tm)

View File

@@ -38,7 +38,7 @@ namespace persistent_data {
class bitset_visitor {
public:
typedef boost::shared_ptr<bitset_visitor> ptr;
typedef std::shared_ptr<bitset_visitor> ptr;
virtual ~bitset_visitor() {}
virtual void visit(uint32_t index, bool value) = 0;
@@ -48,7 +48,7 @@ namespace persistent_data {
class bitset {
public:
typedef boost::shared_ptr<bitset> ptr;
typedef std::shared_ptr<bitset> ptr;
bitset(transaction_manager &tm);
bitset(transaction_manager &tm,
@@ -66,7 +66,7 @@ namespace persistent_data {
void walk_bitset(bitset_detail::bitset_visitor &v) const;
private:
boost::shared_ptr<bitset_detail::bitset_impl> impl_;
std::shared_ptr<bitset_detail::bitset_impl> impl_;
};
}

View File

@@ -4,14 +4,12 @@
#include "persistent-data/transaction_manager.h"
#include "persistent-data/data-structures/bitset.h"
#include <boost/shared_ptr.hpp>
//----------------------------------------------------------------
namespace persistent_data {
class bloom_filter {
public:
typedef boost::shared_ptr<bloom_filter> ptr;
typedef std::shared_ptr<bloom_filter> ptr;
// nr_bits must be a power of two
bloom_filter(transaction_manager &tm,

View File

@@ -298,7 +298,7 @@ namespace persistent_data {
template <unsigned Levels, typename ValueTraits>
class btree {
public:
typedef boost::shared_ptr<btree<Levels, ValueTraits> > ptr;
typedef std::shared_ptr<btree<Levels, ValueTraits> > ptr;
typedef uint64_t key[Levels];
typedef typename ValueTraits::value_type value_type;
@@ -338,7 +338,7 @@ namespace persistent_data {
// inspect the individual nodes that make up a btree.
class visitor {
public:
typedef boost::shared_ptr<visitor> ptr;
typedef std::shared_ptr<visitor> ptr;
typedef btree_detail::node_location node_location;
virtual ~visitor() {}

View File

@@ -10,7 +10,7 @@
namespace persistent_data {
namespace btree_detail {
struct damage {
typedef boost::shared_ptr<damage> ptr;
typedef std::shared_ptr<damage> ptr;
damage(run<uint64_t> lost_keys,
std::string const &desc)

View File

@@ -19,15 +19,13 @@
#ifndef REF_COUNTER_H
#define REF_COUNTER_H
#include <boost/shared_ptr.hpp>
//----------------------------------------------------------------
namespace persistent_data {
template <typename ValueType>
class ref_counter {
public:
boost::shared_ptr<ref_counter<ValueType> > ptr;
std::shared_ptr<ref_counter<ValueType> > ptr;
virtual ~ref_counter() {}