summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-01-04 13:28:20 -0500
committerAndrew Morrow <acm@mongodb.com>2015-01-05 22:55:47 -0500
commit3ec53687da4702d348f1b55eda5e01bd26f36c4b (patch)
treeb2fc1a3315b952ee649d79752e80a5bd00fdb194 /src
parent738e17c6366b416b60dfcebaff99ee2a357c7fcf (diff)
downloadmongo-3ec53687da4702d348f1b55eda5e01bd26f36c4b.tar.gz
SERVER-13256 Remove shared_ptr from pch.h
Diffstat (limited to 'src')
-rw-r--r--src/mongo/client/dbclient_rs.cpp3
-rw-r--r--src/mongo/client/dbclient_rs.h4
-rw-r--r--src/mongo/client/parallel.cpp4
-rw-r--r--src/mongo/client/parallel.h11
-rw-r--r--src/mongo/db/background.cpp2
-rw-r--r--src/mongo/db/catalog/index_create.h1
-rw-r--r--src/mongo/db/commands/pipeline_command.cpp2
-rw-r--r--src/mongo/db/concurrency/lock_state_test.cpp5
-rw-r--r--src/mongo/db/exec/pipeline_proxy.cpp3
-rw-r--r--src/mongo/db/exec/pipeline_proxy.h1
-rw-r--r--src/mongo/db/fts/stop_words.cpp3
-rw-r--r--src/mongo/db/index/2d_common.h3
-rw-r--r--src/mongo/db/matcher/expression_geo.h6
-rw-r--r--src/mongo/db/pipeline/document_source.h5
-rw-r--r--src/mongo/db/pipeline/document_source_cursor.cpp3
-rw-r--r--src/mongo/db/pipeline/document_source_group.cpp1
-rw-r--r--src/mongo/db/pipeline/pipeline_d.cpp2
-rw-r--r--src/mongo/db/pipeline/value.h2
-rw-r--r--src/mongo/db/projection.cpp3
-rw-r--r--src/mongo/db/projection.h3
-rw-r--r--src/mongo/db/query/canonical_query.cpp1
-rw-r--r--src/mongo/db/query/plan_executor.cpp4
-rw-r--r--src/mongo/db/repl/master_slave.cpp3
-rw-r--r--src/mongo/db/repl/master_slave.h6
-rw-r--r--src/mongo/db/repl/multicmd.h7
-rw-r--r--src/mongo/db/repl/oplogreader.cpp2
-rw-r--r--src/mongo/db/repl/oplogreader.h6
-rw-r--r--src/mongo/db/repl/rs_rollback.cpp5
-rw-r--r--src/mongo/db/sorter/sorter.cpp3
-rw-r--r--src/mongo/db/sorter/sorter.h1
-rw-r--r--src/mongo/db/sorter/sorter_test.cpp1
-rw-r--r--src/mongo/db/storage/devnull/devnull_kv_engine.h2
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp4
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp5
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_record_store.cpp5
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp3
-rw-r--r--src/mongo/db/storage/in_memory/in_memory_recovery_unit.h1
-rw-r--r--src/mongo/db/storage/mmap_v1/dur.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_commitjob.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_commitjob.h7
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp5
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_recover.h1
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.cpp2
-rw-r--r--src/mongo/db/storage/mmap_v1/durop.h2
-rw-r--r--src/mongo/db/storage/rocks/rocks_engine.cpp2
-rw-r--r--src/mongo/db/storage/rocks/rocks_record_store.cpp3
-rw-r--r--src/mongo/db/storage/rocks/rocks_record_store.h1
-rw-r--r--src/mongo/db/storage/rocks/rocks_record_store_test.cpp2
-rw-r--r--src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp2
-rw-r--r--src/mongo/db/storage/rocks/rocks_sorted_data_impl.h1
-rw-r--r--src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp1
-rw-r--r--src/mongo/dbtests/basictests.cpp2
-rw-r--r--src/mongo/dbtests/dbtests.h2
-rw-r--r--src/mongo/dbtests/documentsourcetests.cpp2
-rw-r--r--src/mongo/dbtests/perftests.cpp3
-rw-r--r--src/mongo/dbtests/query_plan_executor.cpp2
-rw-r--r--src/mongo/dbtests/query_stage_and.cpp1
-rw-r--r--src/mongo/dbtests/query_stage_count_scan.cpp2
-rw-r--r--src/mongo/dbtests/query_stage_fetch.cpp2
-rw-r--r--src/mongo/dbtests/query_stage_keep.cpp2
-rw-r--r--src/mongo/dbtests/query_stage_near.cpp1
-rw-r--r--src/mongo/dbtests/sharding.cpp4
-rw-r--r--src/mongo/pch.h2
-rw-r--r--src/mongo/s/balance.h3
-rw-r--r--src/mongo/s/chunk.cpp3
-rw-r--r--src/mongo/s/chunk.h9
-rw-r--r--src/mongo/s/collection_metadata.h4
-rw-r--r--src/mongo/s/commands_admin.cpp2
-rw-r--r--src/mongo/s/commands_public.cpp2
-rw-r--r--src/mongo/s/config.h2
-rw-r--r--src/mongo/s/cursors.h1
-rw-r--r--src/mongo/s/distlock_test.cpp3
-rw-r--r--src/mongo/s/multi_host_query.cpp2
-rw-r--r--src/mongo/s/multi_host_query_test.cpp1
-rw-r--r--src/mongo/s/shard.h6
-rw-r--r--src/mongo/scripting/engine.cpp2
-rw-r--r--src/mongo/scripting/v8-3.25_db.cpp2
-rw-r--r--src/mongo/scripting/v8-3.25_utils.cpp2
-rw-r--r--src/mongo/scripting/v8_db.cpp2
-rw-r--r--src/mongo/scripting/v8_deadline_monitor_test.cpp5
-rw-r--r--src/mongo/scripting/v8_utils.cpp5
-rw-r--r--src/mongo/shell/bench.cpp10
-rw-r--r--src/mongo/tools/sniffer.cpp1
-rw-r--r--src/mongo/unittest/unittest.cpp3
-rw-r--r--src/mongo/util/concurrency/task.h2
-rw-r--r--src/mongo/util/embedded_builder.h6
-rw-r--r--src/mongo/util/net/listen.cpp3
-rw-r--r--src/mongo/util/net/listen.h1
-rw-r--r--src/mongo/util/net/message_port.cpp3
-rw-r--r--src/mongo/util/net/message_port.h1
-rw-r--r--src/mongo/util/net/miniwebserver.cpp3
-rw-r--r--src/mongo/util/net/miniwebserver.h2
-rw-r--r--src/mongo/util/net/sock_test.cpp2
-rw-r--r--src/mongo/util/options_parser/environment.cpp2
-rw-r--r--src/mongo/util/options_parser/option_description.cpp3
-rw-r--r--src/mongo/util/options_parser/option_section.cpp3
-rw-r--r--src/mongo/util/options_parser/options_parser.cpp1
98 files changed, 247 insertions, 44 deletions
diff --git a/src/mongo/client/dbclient_rs.cpp b/src/mongo/client/dbclient_rs.cpp
index 18245f5a9ad..929cadf8c48 100644
--- a/src/mongo/client/dbclient_rs.cpp
+++ b/src/mongo/client/dbclient_rs.cpp
@@ -32,6 +32,7 @@
#include "mongo/client/dbclient_rs.h"
#include <memory>
+#include <boost/shared_ptr.hpp>
#include "mongo/bson/util/builder.h"
#include "mongo/client/connpool.h"
@@ -44,6 +45,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
/*
diff --git a/src/mongo/client/dbclient_rs.h b/src/mongo/client/dbclient_rs.h
index 85ee0062410..f5764a9be1f 100644
--- a/src/mongo/client/dbclient_rs.h
+++ b/src/mongo/client/dbclient_rs.h
@@ -42,7 +42,7 @@ namespace mongo {
class ReplicaSetMonitor;
class TagSet;
struct ReadPreferenceSetting;
- typedef shared_ptr<ReplicaSetMonitor> ReplicaSetMonitorPtr;
+ typedef boost::shared_ptr<ReplicaSetMonitor> ReplicaSetMonitorPtr;
/** Use this class to connect to a replica set of servers. The class will manage
checking for which server in a replica set is master, and do failover automatically.
@@ -224,7 +224,7 @@ namespace mongo {
* @throws DBException when an error occurred either when trying to connect to
* a node that was thought to be ok or when an assertion happened.
*/
- DBClientConnection* selectNodeUsingTags(shared_ptr<ReadPreferenceSetting> readPref);
+ DBClientConnection* selectNodeUsingTags(boost::shared_ptr<ReadPreferenceSetting> readPref);
/**
* @return true if the last host used in the last slaveOk query is still in the
diff --git a/src/mongo/client/parallel.cpp b/src/mongo/client/parallel.cpp
index 7016769260a..bb1640e37af 100644
--- a/src/mongo/client/parallel.cpp
+++ b/src/mongo/client/parallel.cpp
@@ -34,6 +34,8 @@
#include "mongo/client/parallel.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/client/connpool.h"
#include "mongo/client/dbclientcursor.h"
#include "mongo/client/dbclient_rs.h"
@@ -51,6 +53,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
LabeledLevel pc( "pcursor", 2 );
void ParallelSortClusteredCursor::init() {
diff --git a/src/mongo/client/parallel.h b/src/mongo/client/parallel.h
index 85ef519ca55..6820edf10a6 100644
--- a/src/mongo/client/parallel.h
+++ b/src/mongo/client/parallel.h
@@ -34,6 +34,7 @@
#pragma once
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/client/export_macros.h"
#include "mongo/db/dbmessage.h"
@@ -101,10 +102,10 @@ namespace mongo {
}
};
- typedef shared_ptr<ShardConnection> ShardConnectionPtr;
+ typedef boost::shared_ptr<ShardConnection> ShardConnectionPtr;
class DBClientCursor;
- typedef shared_ptr<DBClientCursor> DBClientCursorPtr;
+ typedef boost::shared_ptr<DBClientCursor> DBClientCursorPtr;
class MONGO_CLIENT_API ParallelConnectionState {
public:
@@ -133,7 +134,7 @@ namespace mongo {
};
typedef ParallelConnectionState PCState;
- typedef shared_ptr<PCState> PCStatePtr;
+ typedef boost::shared_ptr<PCState> PCStatePtr;
class MONGO_CLIENT_API ParallelConnectionMetadata {
public:
@@ -165,7 +166,7 @@ namespace mongo {
};
typedef ParallelConnectionMetadata PCMData;
- typedef shared_ptr<PCMData> PCMDataPtr;
+ typedef boost::shared_ptr<PCMData> PCMDataPtr;
/**
* Runs a query in parallel across N servers, enforcing compatible chunk versions for queries
@@ -398,7 +399,7 @@ namespace mongo {
* @param conn optional connection to use. will use standard pooled if non-specified
* @param useShardConn use ShardConnection
*/
- static shared_ptr<CommandResult> spawnCommand( const std::string& server,
+ static boost::shared_ptr<CommandResult> spawnCommand( const std::string& server,
const std::string& db,
const BSONObj& cmd,
int options,
diff --git a/src/mongo/db/background.cpp b/src/mongo/db/background.cpp
index d3449915f61..4d8b474e6c1 100644
--- a/src/mongo/db/background.cpp
+++ b/src/mongo/db/background.cpp
@@ -45,6 +45,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
class BgInfo {
diff --git a/src/mongo/db/catalog/index_create.h b/src/mongo/db/catalog/index_create.h
index a94f0fddeeb..4a4be247e77 100644
--- a/src/mongo/db/catalog/index_create.h
+++ b/src/mongo/db/catalog/index_create.h
@@ -31,6 +31,7 @@
#pragma once
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <set>
#include <string>
#include <vector>
diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp
index 11d740f29bd..848e94b7df8 100644
--- a/src/mongo/db/commands/pipeline_command.cpp
+++ b/src/mongo/db/commands/pipeline_command.cpp
@@ -29,6 +29,7 @@
#include "mongo/platform/basic.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/db/auth/action_set.h"
@@ -55,6 +56,7 @@ namespace mongo {
using boost::intrusive_ptr;
using boost::scoped_ptr;
+ using boost::shared_ptr;
static bool isCursorCommand(BSONObj cmdObj) {
BSONElement cursorElem = cmdObj["cursor"];
diff --git a/src/mongo/db/concurrency/lock_state_test.cpp b/src/mongo/db/concurrency/lock_state_test.cpp
index da26040d83f..6fb79500c42 100644
--- a/src/mongo/db/concurrency/lock_state_test.cpp
+++ b/src/mongo/db/concurrency/lock_state_test.cpp
@@ -30,6 +30,7 @@
#include "mongo/platform/basic.h"
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/db/concurrency/lock_manager_test_help.h"
@@ -41,7 +42,9 @@ namespace mongo {
namespace {
const int NUM_PERF_ITERS = 1000*1000; // numeber of iterations to use for lock perf
}
-
+
+ using boost::shared_ptr;
+
TEST(LockerImpl, LockNoConflict) {
const ResourceId resId(RESOURCE_COLLECTION, std::string("TestDB.collection"));
diff --git a/src/mongo/db/exec/pipeline_proxy.cpp b/src/mongo/db/exec/pipeline_proxy.cpp
index 2fd6ba8abc8..ca97e7a962b 100644
--- a/src/mongo/db/exec/pipeline_proxy.cpp
+++ b/src/mongo/db/exec/pipeline_proxy.cpp
@@ -30,12 +30,15 @@
#include "mongo/db/exec/pipeline_proxy.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/pipeline/document_source.h"
#include "mongo/db/pipeline/expression_context.h"
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
PipelineProxyStage::PipelineProxyStage(intrusive_ptr<Pipeline> pipeline,
const boost::shared_ptr<PlanExecutor>& child,
diff --git a/src/mongo/db/exec/pipeline_proxy.h b/src/mongo/db/exec/pipeline_proxy.h
index 9b340653725..d1eb5b4d25c 100644
--- a/src/mongo/db/exec/pipeline_proxy.h
+++ b/src/mongo/db/exec/pipeline_proxy.h
@@ -30,6 +30,7 @@
#include <boost/optional/optional.hpp>
#include <boost/intrusive_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include "mongo/db/catalog/collection.h"
diff --git a/src/mongo/db/fts/stop_words.cpp b/src/mongo/db/fts/stop_words.cpp
index 0dbd5f47dcf..66240a1ce2d 100644
--- a/src/mongo/db/fts/stop_words.cpp
+++ b/src/mongo/db/fts/stop_words.cpp
@@ -28,6 +28,7 @@
* it in the license file.
*/
+#include <boost/shared_ptr.hpp>
#include <set>
#include <string>
@@ -40,6 +41,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace fts {
void loadStopWordMap( StringMap< std::set< std::string > >* m );
diff --git a/src/mongo/db/index/2d_common.h b/src/mongo/db/index/2d_common.h
index dd2dc6faff3..d237c18a1b2 100644
--- a/src/mongo/db/index/2d_common.h
+++ b/src/mongo/db/index/2d_common.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <string>
#include <vector>
@@ -38,7 +39,7 @@ namespace mongo {
struct TwoDIndexingParams {
std::string geo;
std::vector<std::pair<std::string, int> > other;
- shared_ptr<GeoHashConverter> geoHashConverter;
+ boost::shared_ptr<GeoHashConverter> geoHashConverter;
};
} // namespace mongo
diff --git a/src/mongo/db/matcher/expression_geo.h b/src/mongo/db/matcher/expression_geo.h
index c6956712280..4dbf1bb65bf 100644
--- a/src/mongo/db/matcher/expression_geo.h
+++ b/src/mongo/db/matcher/expression_geo.h
@@ -31,6 +31,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/geo/geometry_container.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/db/matcher/expression_leaf.h"
@@ -99,7 +101,7 @@ namespace mongo {
private:
BSONObj _rawObj;
// Share ownership of our query with all of our clones
- shared_ptr<const GeoExpression> _query;
+ boost::shared_ptr<const GeoExpression> _query;
};
@@ -168,7 +170,7 @@ namespace mongo {
private:
BSONObj _rawObj;
// Share ownership of our query with all of our clones
- shared_ptr<const GeoNearExpression> _query;
+ boost::shared_ptr<const GeoNearExpression> _query;
};
} // namespace mongo
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h
index 52900cfaa42..5d7e13cfbfb 100644
--- a/src/mongo/db/pipeline/document_source.h
+++ b/src/mongo/db/pipeline/document_source.h
@@ -36,6 +36,7 @@
#include <boost/optional.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/unordered_map.hpp>
#include <deque>
@@ -245,7 +246,7 @@ namespace mongo {
virtual ~DocumentSourceNeedsMongod() {}
// Gives subclasses access to a MongodInterface implementation
- shared_ptr<MongodInterface> _mongod;
+ boost::shared_ptr<MongodInterface> _mongod;
};
@@ -493,7 +494,7 @@ namespace mongo {
DocumentSourceGroup(const boost::intrusive_ptr<ExpressionContext> &pExpCtx);
/// Spill groups map to disk and returns an iterator to the file.
- shared_ptr<Sorter<Value, Value>::Iterator> spill();
+ boost::shared_ptr<Sorter<Value, Value>::Iterator> spill();
// Only used by spill. Would be function-local if that were legal in C++03.
class SpillSTLComparator;
diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp
index e2a14bcfc43..5c17b373a01 100644
--- a/src/mongo/db/pipeline/document_source_cursor.cpp
+++ b/src/mongo/db/pipeline/document_source_cursor.cpp
@@ -30,6 +30,8 @@
#include "mongo/db/pipeline/document_source.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/catalog/database_holder.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/instance.h"
@@ -43,6 +45,7 @@
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
DocumentSourceCursor::~DocumentSourceCursor() {
dispose();
diff --git a/src/mongo/db/pipeline/document_source_group.cpp b/src/mongo/db/pipeline/document_source_group.cpp
index ed587a32e7e..42116be2be3 100644
--- a/src/mongo/db/pipeline/document_source_group.cpp
+++ b/src/mongo/db/pipeline/document_source_group.cpp
@@ -43,6 +43,7 @@
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
const char DocumentSourceGroup::groupName[] = "$group";
diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp
index 9d20b98a6e3..21c075ba1c6 100644
--- a/src/mongo/db/pipeline/pipeline_d.cpp
+++ b/src/mongo/db/pipeline/pipeline_d.cpp
@@ -31,6 +31,7 @@
#include "mongo/db/pipeline/pipeline_d.h"
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/client/dbclientinterface.h"
#include "mongo/db/catalog/collection.h"
@@ -45,6 +46,7 @@
namespace mongo {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
namespace {
class MongodImplementation : public DocumentSourceNeedsMongod::MongodInterface {
diff --git a/src/mongo/db/pipeline/value.h b/src/mongo/db/pipeline/value.h
index d4dd9b5899e..39303a099fe 100644
--- a/src/mongo/db/pipeline/value.h
+++ b/src/mongo/db/pipeline/value.h
@@ -28,6 +28,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/pipeline/value_internal.h"
#include "mongo/platform/unordered_set.h"
diff --git a/src/mongo/db/projection.cpp b/src/mongo/db/projection.cpp
index cb74b294f1b..1e13dae4e30 100644
--- a/src/mongo/db/projection.cpp
+++ b/src/mongo/db/projection.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/projection.h"
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/db/matcher/matcher.h"
#include "mongo/util/log.h"
@@ -41,6 +42,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
void Projection::init(const BSONObj& o,
const MatchExpressionParser::WhereCallback& whereCallback) {
massert( 10371 , "can only add to Projection once", _source.isEmpty());
diff --git a/src/mongo/db/projection.h b/src/mongo/db/projection.h
index 593af8bed5d..964f6e5fdd0 100644
--- a/src/mongo/db/projection.h
+++ b/src/mongo/db/projection.h
@@ -33,6 +33,9 @@
#include "mongo/platform/basic.h"
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+
+#include <boost/shared_ptr.hpp>
+
#include "mongo/util/string_map.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/matcher.h"
diff --git a/src/mongo/db/query/canonical_query.cpp b/src/mongo/db/query/canonical_query.cpp
index 16c683d93fe..b1e89a0f30f 100644
--- a/src/mongo/db/query/canonical_query.cpp
+++ b/src/mongo/db/query/canonical_query.cpp
@@ -39,6 +39,7 @@
namespace {
+ using boost::shared_ptr;
using std::auto_ptr;
using std::string;
using namespace mongo;
diff --git a/src/mongo/db/query/plan_executor.cpp b/src/mongo/db/query/plan_executor.cpp
index f54f835188a..da113bbe72f 100644
--- a/src/mongo/db/query/plan_executor.cpp
+++ b/src/mongo/db/query/plan_executor.cpp
@@ -28,6 +28,8 @@
#include "mongo/db/query/plan_executor.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/catalog/collection.h"
#include "mongo/db/exec/multi_plan.h"
#include "mongo/db/exec/pipeline_proxy.h"
@@ -43,6 +45,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
/**
diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp
index 9a72485e0d9..b58e6699e8d 100644
--- a/src/mongo/db/repl/master_slave.cpp
+++ b/src/mongo/db/repl/master_slave.cpp
@@ -45,6 +45,7 @@
#include <iostream>
#include <pcrecpp.h>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include "mongo/db/auth/authorization_manager.h"
@@ -236,7 +237,7 @@ namespace repl {
}
}
- v.push_back( shared_ptr< ReplSource >( new ReplSource( s ) ) );
+ v.push_back( boost::shared_ptr< ReplSource >( new ReplSource( s ) ) );
}
/* we reuse our existing objects so that we can keep our existing connection
diff --git a/src/mongo/db/repl/master_slave.h b/src/mongo/db/repl/master_slave.h
index f1ce83fa1a8..117e26d08a1 100644
--- a/src/mongo/db/repl/master_slave.h
+++ b/src/mongo/db/repl/master_slave.h
@@ -28,6 +28,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/repl/oplogreader.h"
/* replication data overview
@@ -75,7 +77,7 @@ namespace repl {
not done (always use main for now).
*/
class ReplSource {
- shared_ptr<threadpool::ThreadPool> tp;
+ boost::shared_ptr<threadpool::ThreadPool> tp;
void resync(OperationContext* txn, const std::string& dbName);
@@ -137,7 +139,7 @@ namespace repl {
int nClonedThisPass;
- typedef std::vector< shared_ptr< ReplSource > > SourceVector;
+ typedef std::vector< boost::shared_ptr< ReplSource > > SourceVector;
static void loadAll(OperationContext* txn, SourceVector&);
explicit ReplSource(OperationContext* txn, BSONObj);
diff --git a/src/mongo/db/repl/multicmd.h b/src/mongo/db/repl/multicmd.h
index d42dd31d92e..fa4519d4f68 100644
--- a/src/mongo/db/repl/multicmd.h
+++ b/src/mongo/db/repl/multicmd.h
@@ -30,6 +30,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <list>
#include "mongo/db/jsobj.h"
@@ -66,16 +67,16 @@ namespace repl {
};
inline void multiCommand(BSONObj cmd, std::list<Target>& L) {
- std::list< shared_ptr<BackgroundJob> > jobs;
+ std::list< boost::shared_ptr<BackgroundJob> > jobs;
for( std::list<Target>::iterator i = L.begin(); i != L.end(); i++ ) {
Target& d = *i;
_MultiCommandJob *j = new _MultiCommandJob(cmd, d);
- jobs.push_back( shared_ptr<BackgroundJob>(j) );
+ jobs.push_back( boost::shared_ptr<BackgroundJob>(j) );
j->go();
}
- for( std::list< shared_ptr<BackgroundJob> >::iterator i = jobs.begin(); i != jobs.end(); i++ ) {
+ for( std::list< boost::shared_ptr<BackgroundJob> >::iterator i = jobs.begin(); i != jobs.end(); i++ ) {
(*i)->wait();
}
}
diff --git a/src/mongo/db/repl/oplogreader.cpp b/src/mongo/db/repl/oplogreader.cpp
index caaf881ec36..45089126825 100644
--- a/src/mongo/db/repl/oplogreader.cpp
+++ b/src/mongo/db/repl/oplogreader.cpp
@@ -52,6 +52,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace repl {
//number of readers created;
diff --git a/src/mongo/db/repl/oplogreader.h b/src/mongo/db/repl/oplogreader.h
index f4434e596d7..527452fd5fc 100644
--- a/src/mongo/db/repl/oplogreader.h
+++ b/src/mongo/db/repl/oplogreader.h
@@ -31,6 +31,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/client/constants.h"
#include "mongo/client/dbclientcursor.h"
#include "mongo/util/net/hostandport.h"
@@ -55,8 +57,8 @@ namespace repl {
class OplogReader {
private:
- shared_ptr<DBClientConnection> _conn;
- shared_ptr<DBClientCursor> cursor;
+ boost::shared_ptr<DBClientConnection> _conn;
+ boost::shared_ptr<DBClientCursor> cursor;
int _tailingQueryOptions;
// If _conn was actively connected, _host represents the current HostAndPort of the
diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp
index 3d46326528e..a5820837384 100644
--- a/src/mongo/db/repl/rs_rollback.cpp
+++ b/src/mongo/db/repl/rs_rollback.cpp
@@ -33,6 +33,8 @@
#include "mongo/db/repl/rs_rollback.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/client.h"
@@ -93,6 +95,9 @@
*/
namespace mongo {
+
+ using boost::shared_ptr;
+
namespace repl {
namespace {
diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp
index e4411d77a96..d3225a5ef4e 100644
--- a/src/mongo/db/sorter/sorter.cpp
+++ b/src/mongo/db/sorter/sorter.cpp
@@ -49,6 +49,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include <snappy.h>
#include "mongo/base/string_data.h"
@@ -63,6 +64,8 @@
namespace mongo {
namespace sorter {
+
+ using boost::shared_ptr;
using namespace mongoutils;
// We need to use the "real" errno everywhere, not GetLastError() on Windows
diff --git a/src/mongo/db/sorter/sorter.h b/src/mongo/db/sorter/sorter.h
index 216f7408e77..49840ddd94d 100644
--- a/src/mongo/db/sorter/sorter.h
+++ b/src/mongo/db/sorter/sorter.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <deque>
#include <fstream>
#include <string>
diff --git a/src/mongo/db/sorter/sorter_test.cpp b/src/mongo/db/sorter/sorter_test.cpp
index cb3bbf304e3..fb4cdf8a8c0 100644
--- a/src/mongo/db/sorter/sorter_test.cpp
+++ b/src/mongo/db/sorter/sorter_test.cpp
@@ -32,6 +32,7 @@
#include <boost/filesystem.hpp>
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#include "mongo/unittest/temp_dir.h"
diff --git a/src/mongo/db/storage/devnull/devnull_kv_engine.h b/src/mongo/db/storage/devnull/devnull_kv_engine.h
index 626ce33d2ea..a1f19d53e19 100644
--- a/src/mongo/db/storage/devnull/devnull_kv_engine.h
+++ b/src/mongo/db/storage/devnull/devnull_kv_engine.h
@@ -30,6 +30,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/kv/kv_engine.h"
#include "mongo/db/storage/recovery_unit_noop.h"
diff --git a/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp b/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
index b0c53356170..0eccc2605be 100644
--- a/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_btree_impl.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/storage/in_memory/in_memory_btree_impl.h"
#include <boost/make_shared.hpp>
+#include <boost/shared_ptr.hpp>
#include <set>
#include "mongo/db/catalog/index_catalog_entry.h"
@@ -41,6 +42,9 @@
#include "mongo/util/mongoutils/str.h"
namespace mongo {
+
+ using boost::shared_ptr;
+
namespace {
const int TempKeyMaxSize = 1024; // this goes away with SERVER-3372
diff --git a/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp b/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp
index c91a64ae85b..0b1a6078571 100644
--- a/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_btree_impl_test.cpp
@@ -29,12 +29,17 @@
*/
#include "mongo/db/storage/in_memory/in_memory_btree_impl.h"
+
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/in_memory/in_memory_recovery_unit.h"
#include "mongo/db/storage/sorted_data_interface_test_harness.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
+ using boost::shared_ptr;
+
class InMemoryHarnessHelper : public HarnessHelper {
public:
InMemoryHarnessHelper()
diff --git a/src/mongo/db/storage/in_memory/in_memory_record_store.cpp b/src/mongo/db/storage/in_memory/in_memory_record_store.cpp
index e609cb89e42..73a91181494 100644
--- a/src/mongo/db/storage/in_memory/in_memory_record_store.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_record_store.cpp
@@ -33,6 +33,8 @@
#include "mongo/db/storage/in_memory/in_memory_record_store.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/oplog_hack.h"
@@ -42,6 +44,9 @@
#include "mongo/util/mongoutils/str.h"
namespace mongo {
+
+ using boost::shared_ptr;
+
class InMemoryRecordStore::InsertChange : public RecoveryUnit::Change {
public:
InsertChange(Data* data, RecordId loc) :_data(data), _loc(loc) {}
diff --git a/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp b/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp
index 2f291768a47..258317c8976 100644
--- a/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp
+++ b/src/mongo/db/storage/in_memory/in_memory_record_store_test.cpp
@@ -29,6 +29,9 @@
*/
#include "mongo/db/storage/in_memory/in_memory_record_store.h"
+
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/in_memory/in_memory_recovery_unit.h"
#include "mongo/db/storage/record_store_test_harness.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h b/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h
index 28e79751436..0407f7191af 100644
--- a/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h
+++ b/src/mongo/db/storage/in_memory/in_memory_recovery_unit.h
@@ -30,6 +30,7 @@
#pragma once
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/db/record_id.h"
diff --git a/src/mongo/db/storage/mmap_v1/dur.cpp b/src/mongo/db/storage/mmap_v1/dur.cpp
index 566751537b4..927a22d14cb 100644
--- a/src/mongo/db/storage/mmap_v1/dur.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur.cpp
@@ -75,6 +75,7 @@
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <iomanip>
@@ -95,6 +96,8 @@
namespace mongo {
namespace dur {
+ using boost::shared_ptr;
+
namespace {
// Used to activate the flush thread
diff --git a/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp b/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
index b063c71a3b1..0d220cabd2c 100644
--- a/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_commitjob.cpp
@@ -37,6 +37,7 @@
#include "mongo/db/storage/mmap_v1/dur_commitjob.h"
+#include <boost/shared_ptr.hpp>
#include <iostream>
#include "mongo/db/client.h"
@@ -48,6 +49,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace dur {
/** base declare write intent function that all the helpers call. */
diff --git a/src/mongo/db/storage/mmap_v1/dur_commitjob.h b/src/mongo/db/storage/mmap_v1/dur_commitjob.h
index b33d60e6e51..763c880dd98 100644
--- a/src/mongo/db/storage/mmap_v1/dur_commitjob.h
+++ b/src/mongo/db/storage/mmap_v1/dur_commitjob.h
@@ -36,6 +36,7 @@
#undef MONGO_PCH_WHITELISTED
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/durop.h"
@@ -113,7 +114,7 @@ namespace mongo {
public:
std::vector<WriteIntent> _intents;
Already<127> _alreadyNoted;
- std::vector< shared_ptr<DurOp> > _durOps; // all the ops other than basic writes
+ std::vector< boost::shared_ptr<DurOp> > _durOps; // all the ops other than basic writes
/** reset the IntentsAndDurOps structure (empties all the above) */
void clear();
@@ -142,12 +143,12 @@ namespace mongo {
CommitJob();
/** note an operation other than a "basic write". threadsafe (locks in the impl) */
- void noteOp(shared_ptr<DurOp> p);
+ void noteOp(boost::shared_ptr<DurOp> p);
/** record/note an intent to write */
void note(void* p, int len);
- std::vector< shared_ptr<DurOp> >& ops() {
+ std::vector< boost::shared_ptr<DurOp> >& ops() {
groupCommitMutex.dassertLocked(); // this is what really makes the below safe
return _intentsAndDurOps._durOps;
}
diff --git a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
index 2aaf7e0a4e8..7a845d06d90 100644
--- a/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_preplogbuffer.cpp
@@ -43,6 +43,8 @@
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/dur_commitjob.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
@@ -59,6 +61,9 @@
using namespace mongoutils;
namespace mongo {
+
+ using boost::shared_ptr;
+
namespace dur {
extern Journal j;
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.cpp b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
index aa1b0db7ad9..2b1964f24d5 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.cpp
@@ -36,6 +36,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <fcntl.h>
#include <iomanip>
#include <iostream>
@@ -69,6 +70,8 @@ using namespace mongoutils;
namespace mongo {
+ using boost::shared_ptr;
+
/**
* Thrown when a journal section is corrupt. This is considered OK as long as it occurs while
* processing the last file. Processing stops at the first corrupt section.
diff --git a/src/mongo/db/storage/mmap_v1/dur_recover.h b/src/mongo/db/storage/mmap_v1/dur_recover.h
index 45cf803ff13..fb921281c61 100644
--- a/src/mongo/db/storage/mmap_v1/dur_recover.h
+++ b/src/mongo/db/storage/mmap_v1/dur_recover.h
@@ -32,6 +32,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <list>
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
diff --git a/src/mongo/db/storage/mmap_v1/durop.cpp b/src/mongo/db/storage/mmap_v1/durop.cpp
index 18c441393f8..1b9db3ac23f 100644
--- a/src/mongo/db/storage/mmap_v1/durop.cpp
+++ b/src/mongo/db/storage/mmap_v1/durop.cpp
@@ -46,10 +46,12 @@
using namespace mongoutils;
#include <boost/filesystem/operations.hpp>
+#include <boost/shared_ptr.hpp>
namespace mongo {
using boost::scoped_array;
+ using boost::shared_ptr;
namespace dur {
diff --git a/src/mongo/db/storage/mmap_v1/durop.h b/src/mongo/db/storage/mmap_v1/durop.h
index d89613a72a4..ee31780896f 100644
--- a/src/mongo/db/storage/mmap_v1/durop.h
+++ b/src/mongo/db/storage/mmap_v1/durop.h
@@ -30,6 +30,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
#include "mongo/util/bufreader.h"
#include "mongo/util/paths.h"
diff --git a/src/mongo/db/storage/rocks/rocks_engine.cpp b/src/mongo/db/storage/rocks/rocks_engine.cpp
index 94c453bf527..97d92344e01 100644
--- a/src/mongo/db/storage/rocks/rocks_engine.cpp
+++ b/src/mongo/db/storage/rocks/rocks_engine.cpp
@@ -58,6 +58,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
const std::string RocksEngine::kOrderingPrefix("indexordering-");
const std::string RocksEngine::kCollectionPrefix("collection-");
diff --git a/src/mongo/db/storage/rocks/rocks_record_store.cpp b/src/mongo/db/storage/rocks/rocks_record_store.cpp
index fec387b6e7f..21deaffbdda 100644
--- a/src/mongo/db/storage/rocks/rocks_record_store.cpp
+++ b/src/mongo/db/storage/rocks/rocks_record_store.cpp
@@ -37,6 +37,7 @@
#include <algorithm>
#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
#include <rocksdb/comparator.h>
#include <rocksdb/db.h>
@@ -55,6 +56,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace {
class CappedInsertChange : public RecoveryUnit::Change {
diff --git a/src/mongo/db/storage/rocks/rocks_record_store.h b/src/mongo/db/storage/rocks/rocks_record_store.h
index 5bcf7befb8d..5770170fe81 100644
--- a/src/mongo/db/storage/rocks/rocks_record_store.h
+++ b/src/mongo/db/storage/rocks/rocks_record_store.h
@@ -33,6 +33,7 @@
#include <atomic>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <string>
#include <memory>
#include <vector>
diff --git a/src/mongo/db/storage/rocks/rocks_record_store_test.cpp b/src/mongo/db/storage/rocks/rocks_record_store_test.cpp
index 16883e7e401..2d40ee3aa4e 100644
--- a/src/mongo/db/storage/rocks/rocks_record_store_test.cpp
+++ b/src/mongo/db/storage/rocks/rocks_record_store_test.cpp
@@ -33,6 +33,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <rocksdb/comparator.h>
#include <rocksdb/db.h>
@@ -50,6 +51,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class RocksRecordStoreHarnessHelper : public HarnessHelper {
public:
diff --git a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp
index 188d5ee1280..dc57f33badc 100644
--- a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp
+++ b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/storage/rocks/rocks_sorted_data_impl.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <cstdlib>
#include <string>
@@ -52,6 +53,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
namespace {
diff --git a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h
index 49a78e4d2f3..0ba44b1e7fc 100644
--- a/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h
+++ b/src/mongo/db/storage/rocks/rocks_sorted_data_impl.h
@@ -31,6 +31,7 @@
#include "mongo/db/storage/sorted_data_interface.h"
#include <atomic>
+#include <boost/shared_ptr.hpp>
#include <string>
#include <rocksdb/db.h>
diff --git a/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp b/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp
index 4a266c2efed..1572278cc90 100644
--- a/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp
+++ b/src/mongo/db/storage/rocks/rocks_sorted_data_impl_test.cpp
@@ -47,6 +47,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class RocksSortedDataImplHarness : public HarnessHelper {
public:
diff --git a/src/mongo/dbtests/basictests.cpp b/src/mongo/dbtests/basictests.cpp
index b0d7bb51c18..4d1deb94167 100644
--- a/src/mongo/dbtests/basictests.cpp
+++ b/src/mongo/dbtests/basictests.cpp
@@ -32,6 +32,7 @@
#include "mongo/platform/basic.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include <iostream>
#include "mongo/db/operation_context_impl.h"
@@ -49,6 +50,7 @@
namespace BasicTests {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class Rarely {
public:
diff --git a/src/mongo/dbtests/dbtests.h b/src/mongo/dbtests/dbtests.h
index c3dff859a0f..159466f82b0 100644
--- a/src/mongo/dbtests/dbtests.h
+++ b/src/mongo/dbtests/dbtests.h
@@ -31,6 +31,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/instance.h"
#include "mongo/unittest/unittest.h"
diff --git a/src/mongo/dbtests/documentsourcetests.cpp b/src/mongo/dbtests/documentsourcetests.cpp
index 068a51b28bd..34cb050eaa2 100644
--- a/src/mongo/dbtests/documentsourcetests.cpp
+++ b/src/mongo/dbtests/documentsourcetests.cpp
@@ -33,6 +33,7 @@
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include "mongo/db/catalog/collection.h"
@@ -49,6 +50,7 @@
namespace DocumentSourceTests {
using boost::intrusive_ptr;
+ using boost::shared_ptr;
static const char* const ns = "unittests.documentsourcetests";
static const BSONObj metaTextScore = BSON("$meta" << "textScore");
diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp
index 2c4fb8d64e5..5520c0419fc 100644
--- a/src/mongo/dbtests/perftests.cpp
+++ b/src/mongo/dbtests/perftests.cpp
@@ -39,6 +39,7 @@
#include "mongo/platform/basic.h"
#include <boost/filesystem/operations.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <boost/version.hpp>
#include <iomanip>
@@ -73,6 +74,8 @@
namespace PerfTests {
+ using boost::shared_ptr;
+
const bool profiling = false;
class ClientBase {
diff --git a/src/mongo/dbtests/query_plan_executor.cpp b/src/mongo/dbtests/query_plan_executor.cpp
index be4abf54f4d..d44e5cfa688 100644
--- a/src/mongo/dbtests/query_plan_executor.cpp
+++ b/src/mongo/dbtests/query_plan_executor.cpp
@@ -27,6 +27,7 @@
*/
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/db/clientcursor.h"
#include "mongo/db/catalog/collection.h"
@@ -49,6 +50,7 @@
namespace QueryPlanExecutor {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class PlanExecutorBase {
public:
diff --git a/src/mongo/dbtests/query_stage_and.cpp b/src/mongo/dbtests/query_stage_and.cpp
index 8a9993e9dc1..1574db01b07 100644
--- a/src/mongo/dbtests/query_stage_and.cpp
+++ b/src/mongo/dbtests/query_stage_and.cpp
@@ -52,6 +52,7 @@
namespace QueryStageAnd {
using boost::scoped_ptr;
+ using boost::shared_ptr;
class QueryStageAndBase {
public:
diff --git a/src/mongo/dbtests/query_stage_count_scan.cpp b/src/mongo/dbtests/query_stage_count_scan.cpp
index d3d379fc6fe..5e15fcaa3c8 100644
--- a/src/mongo/dbtests/query_stage_count_scan.cpp
+++ b/src/mongo/dbtests/query_stage_count_scan.cpp
@@ -46,6 +46,8 @@
namespace QueryStageCountScan {
+ using boost::shared_ptr;
+
class CountBase {
public:
CountBase() : _client(&_txn) {
diff --git a/src/mongo/dbtests/query_stage_fetch.cpp b/src/mongo/dbtests/query_stage_fetch.cpp
index cb13920cae6..6926f7de8cd 100644
--- a/src/mongo/dbtests/query_stage_fetch.cpp
+++ b/src/mongo/dbtests/query_stage_fetch.cpp
@@ -46,6 +46,8 @@
namespace QueryStageFetch {
+ using boost::shared_ptr;
+
class QueryStageFetchBase {
public:
QueryStageFetchBase() : _client(&_txn) {
diff --git a/src/mongo/dbtests/query_stage_keep.cpp b/src/mongo/dbtests/query_stage_keep.cpp
index 9b7b6464c87..bc4f37c3ce2 100644
--- a/src/mongo/dbtests/query_stage_keep.cpp
+++ b/src/mongo/dbtests/query_stage_keep.cpp
@@ -51,6 +51,8 @@
namespace QueryStageKeep {
+ using boost::shared_ptr;
+
class QueryStageKeepBase {
public:
QueryStageKeepBase() : _client(&_txn) {
diff --git a/src/mongo/dbtests/query_stage_near.cpp b/src/mongo/dbtests/query_stage_near.cpp
index c44a9157a27..0ee881904ef 100644
--- a/src/mongo/dbtests/query_stage_near.cpp
+++ b/src/mongo/dbtests/query_stage_near.cpp
@@ -40,6 +40,7 @@
namespace {
using namespace mongo;
+ using boost::shared_ptr;
using std::vector;
/**
diff --git a/src/mongo/dbtests/sharding.cpp b/src/mongo/dbtests/sharding.cpp
index 823b114677f..505b34655d7 100644
--- a/src/mongo/dbtests/sharding.cpp
+++ b/src/mongo/dbtests/sharding.cpp
@@ -30,6 +30,8 @@
#include "mongo/platform/basic.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/client/dbclientmockcursor.h"
#include "mongo/client/parallel.h"
#include "mongo/db/dbdirectclient.h"
@@ -45,6 +47,8 @@
namespace ShardingTests {
+ using boost::shared_ptr;
+
namespace serverandquerytests {
class test1 {
public:
diff --git a/src/mongo/pch.h b/src/mongo/pch.h
index bed7f13b9c8..fbe18a8fdd2 100644
--- a/src/mongo/pch.h
+++ b/src/mongo/pch.h
@@ -50,14 +50,12 @@
#include <vector>
#define BOOST_FILESYSTEM_VERSION 3
-#include <boost/shared_ptr.hpp>
#include "mongo/client/redef_macros.h"
namespace mongo {
using namespace std;
- using boost::shared_ptr;
}
#include "mongo/util/debug_util.h"
diff --git a/src/mongo/s/balance.h b/src/mongo/s/balance.h
index df87cb94b19..57f42adbaa5 100644
--- a/src/mongo/s/balance.h
+++ b/src/mongo/s/balance.h
@@ -36,6 +36,7 @@
#undef MONGO_PCH_WHITELISTED
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/client/dbclientinterface.h"
#include "mongo/s/balancer_policy.h"
@@ -67,7 +68,7 @@ namespace mongo {
private:
typedef MigrateInfo CandidateChunk;
- typedef shared_ptr<CandidateChunk> CandidateChunkPtr;
+ typedef boost::shared_ptr<CandidateChunk> CandidateChunkPtr;
// hostname:port of my mongos
std::string _myid;
diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp
index db7c591a805..e50a6930dde 100644
--- a/src/mongo/s/chunk.cpp
+++ b/src/mongo/s/chunk.cpp
@@ -34,6 +34,7 @@
#include "mongo/s/chunk.h"
+#include <boost/shared_ptr.hpp>
#include <iostream>
#include "mongo/base/owned_pointer_map.h"
@@ -71,6 +72,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
inline bool allOfType(BSONType type, const BSONObj& o) {
BSONObjIterator it(o);
while(it.more()) {
diff --git a/src/mongo/s/chunk.h b/src/mongo/s/chunk.h
index 24bbbdc7d74..cc497fea8d7 100644
--- a/src/mongo/s/chunk.h
+++ b/src/mongo/s/chunk.h
@@ -31,6 +31,7 @@
#pragma once
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/base/string_data.h"
#include "mongo/db/keypattern.h"
@@ -51,13 +52,13 @@ namespace mongo {
class ChunkObjUnitTest;
struct WriteConcernOptions;
- typedef shared_ptr<const Chunk> ChunkPtr;
+ typedef boost::shared_ptr<const Chunk> ChunkPtr;
// key is max for each Chunk or ChunkRange
typedef std::map<BSONObj,ChunkPtr,BSONObjCmp> ChunkMap;
- typedef std::map<BSONObj,shared_ptr<ChunkRange>,BSONObjCmp> ChunkRangeMap;
+ typedef std::map<BSONObj,boost::shared_ptr<ChunkRange>,BSONObjCmp> ChunkRangeMap;
- typedef shared_ptr<const ChunkManager> ChunkManagerPtr;
+ typedef boost::shared_ptr<const ChunkManager> ChunkManagerPtr;
/**
config.chunks
@@ -578,7 +579,7 @@ namespace mongo {
bool operator()( const ChunkRange &l, const ChunkRange &r ) const {
return _cmp(l.getMin(), r.getMin());
}
- bool operator()( const shared_ptr<ChunkRange> l, const shared_ptr<ChunkRange> r ) const {
+ bool operator()( const boost::shared_ptr<ChunkRange> l, const boost::shared_ptr<ChunkRange> r ) const {
return operator()(*l, *r);
}
private:
diff --git a/src/mongo/s/collection_metadata.h b/src/mongo/s/collection_metadata.h
index fa62b49e045..5bbf1d28be5 100644
--- a/src/mongo/s/collection_metadata.h
+++ b/src/mongo/s/collection_metadata.h
@@ -28,6 +28,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/base/disallow_copying.h"
#include "mongo/base/owned_pointer_vector.h"
#include "mongo/db/field_ref_set.h"
@@ -42,7 +44,7 @@ namespace mongo {
// For now, we handle lifecycle of CollectionManager via shared_ptrs
class CollectionMetadata;
- typedef shared_ptr<const CollectionMetadata> CollectionMetadataPtr;
+ typedef boost::shared_ptr<const CollectionMetadata> CollectionMetadataPtr;
/**
* The collection metadata has metadata information about a collection, in particular the
diff --git a/src/mongo/s/commands_admin.cpp b/src/mongo/s/commands_admin.cpp
index 566ea634e82..346e0ea4dad 100644
--- a/src/mongo/s/commands_admin.cpp
+++ b/src/mongo/s/commands_admin.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/commands.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/client/connpool.h"
#include "mongo/client/dbclientcursor.h"
@@ -82,6 +83,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
namespace dbgrid_cmds {
diff --git a/src/mongo/s/commands_public.cpp b/src/mongo/s/commands_public.cpp
index 086326b4517..b3287fd4a43 100644
--- a/src/mongo/s/commands_public.cpp
+++ b/src/mongo/s/commands_public.cpp
@@ -33,6 +33,7 @@
#include "mongo/platform/basic.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/base/init.h"
#include "mongo/client/connpool.h"
@@ -74,6 +75,7 @@ namespace mongo {
using boost::intrusive_ptr;
using boost::scoped_ptr;
+ using boost::shared_ptr;
namespace dbgrid_pub_cmds {
diff --git a/src/mongo/s/config.h b/src/mongo/s/config.h
index 78810ed8653..87e901a520e 100644
--- a/src/mongo/s/config.h
+++ b/src/mongo/s/config.h
@@ -35,6 +35,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
#include "mongo/client/dbclient_rs.h"
#include "mongo/s/chunk.h"
#include "mongo/s/shard.h"
diff --git a/src/mongo/s/cursors.h b/src/mongo/s/cursors.h
index 0eb2aa677aa..f72656f6612 100644
--- a/src/mongo/s/cursors.h
+++ b/src/mongo/s/cursors.h
@@ -36,6 +36,7 @@
#undef MONGO_PCH_WHITELISTED
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <string>
#include "mongo/client/parallel.h"
diff --git a/src/mongo/s/distlock_test.cpp b/src/mongo/s/distlock_test.cpp
index bb6489e1b6b..f8fe2c10edf 100644
--- a/src/mongo/s/distlock_test.cpp
+++ b/src/mongo/s/distlock_test.cpp
@@ -33,6 +33,7 @@
#include "mongo/s/distlock.h"
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <iostream>
#include <vector>
@@ -75,6 +76,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
class TestDistLockWithSync: public Command {
public:
TestDistLockWithSync() :
diff --git a/src/mongo/s/multi_host_query.cpp b/src/mongo/s/multi_host_query.cpp
index 48251e37b0b..d62f63e098c 100644
--- a/src/mongo/s/multi_host_query.cpp
+++ b/src/mongo/s/multi_host_query.cpp
@@ -30,6 +30,8 @@
#include "mongo/s/multi_host_query.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/bson/util/builder.h"
namespace mongo {
diff --git a/src/mongo/s/multi_host_query_test.cpp b/src/mongo/s/multi_host_query_test.cpp
index 22f53867150..e2dde9b3619 100644
--- a/src/mongo/s/multi_host_query_test.cpp
+++ b/src/mongo/s/multi_host_query_test.cpp
@@ -29,6 +29,7 @@
#include "mongo/s/multi_host_query.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/unittest/unittest.h"
#include "mongo/util/concurrency/synchronization.h"
diff --git a/src/mongo/s/shard.h b/src/mongo/s/shard.h
index 14f11d3e976..a627c0e19dd 100644
--- a/src/mongo/s/shard.h
+++ b/src/mongo/s/shard.h
@@ -35,6 +35,8 @@
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+#include <boost/shared_ptr.hpp>
+
#include "mongo/client/connpool.h"
namespace mongo {
@@ -190,7 +192,7 @@ namespace mongo {
bool _isDraining; // shard is currently being removed
std::set<std::string> _tags;
};
- typedef shared_ptr<Shard> ShardPtr;
+ typedef boost::shared_ptr<Shard> ShardPtr;
class ShardStatus {
public:
@@ -233,7 +235,7 @@ namespace mongo {
};
class ChunkManager;
- typedef shared_ptr<const ChunkManager> ChunkManagerPtr;
+ typedef boost::shared_ptr<const ChunkManager> ChunkManagerPtr;
class ShardConnection : public AScopedConnection {
public:
diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp
index 5c42ba9cfd5..408beb4b2a8 100644
--- a/src/mongo/scripting/engine.cpp
+++ b/src/mongo/scripting/engine.cpp
@@ -37,6 +37,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/client/dbclientcursor.h"
#include "mongo/client/dbclientinterface.h"
@@ -49,6 +50,7 @@
namespace mongo {
using boost::scoped_ptr;
+ using boost::shared_ptr;
long long Scope::_lastVersion = 1;
diff --git a/src/mongo/scripting/v8-3.25_db.cpp b/src/mongo/scripting/v8-3.25_db.cpp
index fc7f7ae6ac8..58ffc3a5fe2 100644
--- a/src/mongo/scripting/v8-3.25_db.cpp
+++ b/src/mongo/scripting/v8-3.25_db.cpp
@@ -32,6 +32,7 @@
#include <iostream>
#include <iomanip>
#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/base/init.h"
#include "mongo/client/sasl_client_authenticate.h"
@@ -47,6 +48,7 @@
using namespace std;
using boost::scoped_array;
+using boost::shared_ptr;
namespace mongo {
diff --git a/src/mongo/scripting/v8-3.25_utils.cpp b/src/mongo/scripting/v8-3.25_utils.cpp
index 9a5ed27b5bf..3ca1205cae7 100644
--- a/src/mongo/scripting/v8-3.25_utils.cpp
+++ b/src/mongo/scripting/v8-3.25_utils.cpp
@@ -35,6 +35,7 @@
#include <boost/scoped_ptr.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
#include <iostream>
@@ -50,6 +51,7 @@
using namespace std;
using boost::scoped_ptr;
+using boost::shared_ptr;
namespace mongo {
diff --git a/src/mongo/scripting/v8_db.cpp b/src/mongo/scripting/v8_db.cpp
index 1346e4b8313..1f784c24b0c 100644
--- a/src/mongo/scripting/v8_db.cpp
+++ b/src/mongo/scripting/v8_db.cpp
@@ -32,6 +32,7 @@
#include <iostream>
#include <iomanip>
#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/base/init.h"
#include "mongo/client/sasl_client_authenticate.h"
@@ -49,6 +50,7 @@
using namespace std;
using boost::scoped_array;
+using boost::shared_ptr;
namespace mongo {
diff --git a/src/mongo/scripting/v8_deadline_monitor_test.cpp b/src/mongo/scripting/v8_deadline_monitor_test.cpp
index e96ba9d8f78..dd052e8d0e9 100644
--- a/src/mongo/scripting/v8_deadline_monitor_test.cpp
+++ b/src/mongo/scripting/v8_deadline_monitor_test.cpp
@@ -35,9 +35,14 @@
#include "mongo/scripting/v8_deadline_monitor.h"
+#include <boost/shared_ptr.hpp>
+
#include "mongo/unittest/unittest.h"
namespace mongo {
+
+ using boost::shared_ptr;
+
class TaskGroup {
public:
TaskGroup() : _m("TestGroup"), _c(), _killCount(0), _targetKillCount(0) { }
diff --git a/src/mongo/scripting/v8_utils.cpp b/src/mongo/scripting/v8_utils.cpp
index 4a3dbc9c8f7..098d04e8123 100644
--- a/src/mongo/scripting/v8_utils.cpp
+++ b/src/mongo/scripting/v8_utils.cpp
@@ -35,6 +35,7 @@
#include <boost/scoped_ptr.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
#include <iostream>
@@ -232,13 +233,13 @@ namespace mongo {
}
private:
- shared_ptr<SharedData> _sharedData;
+ boost::shared_ptr<SharedData> _sharedData;
};
bool _started;
bool _done;
scoped_ptr<boost::thread> _thread;
- shared_ptr<SharedData> _sharedData;
+ boost::shared_ptr<SharedData> _sharedData;
};
class CountDownLatchHolder {
diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp
index a287b8dd01c..2bdaf2f1929 100644
--- a/src/mongo/shell/bench.cpp
+++ b/src/mongo/shell/bench.cpp
@@ -37,6 +37,7 @@
#include <pcrecpp.h>
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/thread.hpp>
#include <iostream>
@@ -51,7 +52,6 @@
#include "mongo/util/time_support.h"
#include "mongo/util/version.h"
-
// ---------------------------------
// ---- benchmarking system --------
// ---------------------------------
@@ -191,25 +191,25 @@ namespace mongo {
if ( ! args["trapPattern"].eoo() ){
const char* regex = args["trapPattern"].regex();
const char* flags = args["trapPattern"].regexFlags();
- this->trapPattern = shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
+ this->trapPattern = boost::shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
}
if ( ! args["noTrapPattern"].eoo() ){
const char* regex = args["noTrapPattern"].regex();
const char* flags = args["noTrapPattern"].regexFlags();
- this->noTrapPattern = shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
+ this->noTrapPattern = boost::shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
}
if ( ! args["watchPattern"].eoo() ){
const char* regex = args["watchPattern"].regex();
const char* flags = args["watchPattern"].regexFlags();
- this->watchPattern = shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
+ this->watchPattern = boost::shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
}
if ( ! args["noWatchPattern"].eoo() ){
const char* regex = args["noWatchPattern"].regex();
const char* flags = args["noWatchPattern"].regexFlags();
- this->noWatchPattern = shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
+ this->noWatchPattern = boost::shared_ptr< pcrecpp::RE >( new pcrecpp::RE( regex, flags2options( flags ) ) );
}
this->ops = args["ops"].Obj().getOwned();
diff --git a/src/mongo/tools/sniffer.cpp b/src/mongo/tools/sniffer.cpp
index 91e077ef4c0..92b07659e8b 100644
--- a/src/mongo/tools/sniffer.cpp
+++ b/src/mongo/tools/sniffer.cpp
@@ -74,6 +74,7 @@
#include "mongo/util/text.h"
using namespace std;
+using boost::shared_ptr;
using mongo::Message;
using mongo::DbMessage;
using mongo::BSONObj;
diff --git a/src/mongo/unittest/unittest.cpp b/src/mongo/unittest/unittest.cpp
index e7b87874dba..91b334badd4 100644
--- a/src/mongo/unittest/unittest.cpp
+++ b/src/mongo/unittest/unittest.cpp
@@ -35,6 +35,7 @@
#include "mongo/unittest/unittest.h"
+#include <boost/shared_ptr.hpp>
#include <iostream>
#include <map>
@@ -50,6 +51,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
namespace unittest {
namespace {
diff --git a/src/mongo/util/concurrency/task.h b/src/mongo/util/concurrency/task.h
index 9eec42f85bc..2b1ea26a1ce 100644
--- a/src/mongo/util/concurrency/task.h
+++ b/src/mongo/util/concurrency/task.h
@@ -74,7 +74,7 @@ namespace mongo {
virtual void doWork() { result = 1234; }
Sample() : result(0) { }
};
- shared_ptr<Sample> q( new Sample() );
+ boost::shared_ptr<Sample> q( new Sample() );
fork(q);
cout << q->result << std::endl; // could print 1234 or 0.
}
diff --git a/src/mongo/util/embedded_builder.h b/src/mongo/util/embedded_builder.h
index 7cb9671b1dd..068d80200c2 100644
--- a/src/mongo/util/embedded_builder.h
+++ b/src/mongo/util/embedded_builder.h
@@ -29,6 +29,8 @@
#pragma once
+#include <boost/shared_ptr.hpp>
+
namespace mongo {
// utility class for assembling hierarchical objects
@@ -84,7 +86,7 @@ namespace mongo {
private:
void addBuilder( const std::string &name ) {
- shared_ptr< BSONObjBuilder > newBuilder( new BSONObjBuilder( back()->subobjStart( name ) ) );
+ boost::shared_ptr< BSONObjBuilder > newBuilder( new BSONObjBuilder( back()->subobjStart( name ) ) );
_builders.push_back( std::make_pair( name, newBuilder.get() ) );
_builderStorage.push_back( newBuilder );
}
@@ -97,7 +99,7 @@ namespace mongo {
BSONObjBuilder *back() { return _builders.back().second; }
std::vector< std::pair< std::string, BSONObjBuilder * > > _builders;
- std::vector< shared_ptr< BSONObjBuilder > > _builderStorage;
+ std::vector< boost::shared_ptr< BSONObjBuilder > > _builderStorage;
};
diff --git a/src/mongo/util/net/listen.cpp b/src/mongo/util/net/listen.cpp
index fa0c97ead1a..ea20d07e4e6 100644
--- a/src/mongo/util/net/listen.cpp
+++ b/src/mongo/util/net/listen.cpp
@@ -35,6 +35,7 @@
#include "mongo/util/net/listen.h"
#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/db/server_options.h"
#include "mongo/base/owned_pointer_vector.h"
@@ -74,6 +75,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
// ----- Listener -------
const Listener* Listener::_timeTracker;
diff --git a/src/mongo/util/net/listen.h b/src/mongo/util/net/listen.h
index d5b3fc36aa6..6efb3a717b3 100644
--- a/src/mongo/util/net/listen.h
+++ b/src/mongo/util/net/listen.h
@@ -30,6 +30,7 @@
#pragma once
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition_variable.hpp>
#include <set>
diff --git a/src/mongo/util/net/message_port.cpp b/src/mongo/util/net/message_port.cpp
index e29bba9584d..4fc33df7dc4 100644
--- a/src/mongo/util/net/message_port.cpp
+++ b/src/mongo/util/net/message_port.cpp
@@ -33,6 +33,7 @@
#include "mongo/util/net/message_port.h"
+#include <boost/shared_ptr.hpp>
#include <fcntl.h>
#include <time.h>
@@ -56,6 +57,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
// if you want trace output:
#define mmm(x)
diff --git a/src/mongo/util/net/message_port.h b/src/mongo/util/net/message_port.h
index ee64a7a7584..59c67da856a 100644
--- a/src/mongo/util/net/message_port.h
+++ b/src/mongo/util/net/message_port.h
@@ -30,6 +30,7 @@
#pragma once
#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
#include <vector>
#include "mongo/util/net/message.h"
diff --git a/src/mongo/util/net/miniwebserver.cpp b/src/mongo/util/net/miniwebserver.cpp
index 51ef5ff27ce..92700291944 100644
--- a/src/mongo/util/net/miniwebserver.cpp
+++ b/src/mongo/util/net/miniwebserver.cpp
@@ -33,6 +33,7 @@
#include "mongo/util/net/miniwebserver.h"
+#include <boost/shared_ptr.hpp>
#include <pcrecpp.h>
#include "mongo/util/hex.h"
@@ -40,6 +41,8 @@
namespace mongo {
+ using boost::shared_ptr;
+
MiniWebServer::MiniWebServer(const string& name, const string &ip, int port)
: Listener(name, ip, port, false)
{}
diff --git a/src/mongo/util/net/miniwebserver.h b/src/mongo/util/net/miniwebserver.h
index c95333371ee..3563dac5139 100644
--- a/src/mongo/util/net/miniwebserver.h
+++ b/src/mongo/util/net/miniwebserver.h
@@ -34,6 +34,8 @@
#include "mongo/pch.h"
#undef MONGO_PCH_WHITELISTED
+#include <boost/shared_ptr.hpp>
+
#include "mongo/db/jsobj.h"
#include "mongo/util/net/listen.h"
#include "mongo/util/net/message.h"
diff --git a/src/mongo/util/net/sock_test.cpp b/src/mongo/util/net/sock_test.cpp
index bf82cec7aa9..3b6a6a07638 100644
--- a/src/mongo/util/net/sock_test.cpp
+++ b/src/mongo/util/net/sock_test.cpp
@@ -30,6 +30,7 @@
#include "mongo/util/net/sock.h"
+#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
#ifndef _WIN32
@@ -46,6 +47,7 @@
namespace {
using namespace mongo;
+ using boost::shared_ptr;
typedef boost::shared_ptr<Socket> SocketPtr;
typedef std::pair<SocketPtr, SocketPtr> SocketPair;
diff --git a/src/mongo/util/options_parser/environment.cpp b/src/mongo/util/options_parser/environment.cpp
index 6c7a8ff1cec..c85989c4c7c 100644
--- a/src/mongo/util/options_parser/environment.cpp
+++ b/src/mongo/util/options_parser/environment.cpp
@@ -38,6 +38,8 @@
namespace mongo {
namespace optionenvironment {
+ using boost::shared_ptr;
+
// Environment implementation
Status Environment::addKeyConstraint(KeyConstraint* keyConstraint) {
diff --git a/src/mongo/util/options_parser/option_description.cpp b/src/mongo/util/options_parser/option_description.cpp
index a53fb320216..c903a3ddce0 100644
--- a/src/mongo/util/options_parser/option_description.cpp
+++ b/src/mongo/util/options_parser/option_description.cpp
@@ -28,12 +28,15 @@
#include "mongo/util/options_parser/option_description.h"
#include <algorithm>
+#include <boost/shared_ptr.hpp>
#include "mongo/util/assert_util.h"
namespace mongo {
namespace optionenvironment {
+ using boost::shared_ptr;
+
namespace {
/**
* Utility function check that the type of our Value matches our OptionType
diff --git a/src/mongo/util/options_parser/option_section.cpp b/src/mongo/util/options_parser/option_section.cpp
index 04cf223eac1..1e31ce44374 100644
--- a/src/mongo/util/options_parser/option_section.cpp
+++ b/src/mongo/util/options_parser/option_section.cpp
@@ -28,6 +28,7 @@
#include "mongo/util/options_parser/option_section.h"
#include <algorithm>
+#include <boost/shared_ptr.hpp>
#include <iostream>
#include <sstream>
@@ -38,6 +39,8 @@
namespace mongo {
namespace optionenvironment {
+ using boost::shared_ptr;
+
// Registration interface
// TODO: Make sure the section we are adding does not have duplicate options
diff --git a/src/mongo/util/options_parser/options_parser.cpp b/src/mongo/util/options_parser/options_parser.cpp
index e861f48b363..e4d4817f546 100644
--- a/src/mongo/util/options_parser/options_parser.cpp
+++ b/src/mongo/util/options_parser/options_parser.cpp
@@ -53,6 +53,7 @@ namespace mongo {
namespace optionenvironment {
using namespace std;
+ using boost::shared_ptr;
namespace po = boost::program_options;