Skip to content

Commit bd35adb

Browse files
committed
Replaced boost::shared_ptr with std::shared_ptr.
1 parent 8a4c1a0 commit bd35adb

28 files changed

+119
-120
lines changed

boost/network/protocol/http/client/async_impl.hpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
// http://www.boost.org/LICENSE_1_0.txt)
1010

1111
#include <thread>
12+
#include <memory>
1213
#include <boost/asio/io_service.hpp>
1314
#include <boost/asio/strand.hpp>
1415
#include <boost/bind.hpp>
15-
#include <boost/make_shared.hpp>
1616
#include <boost/network/protocol/http/traits/connection_policy.hpp>
17-
#include <boost/shared_ptr.hpp>
1817

1918
namespace boost {
2019
namespace network {
@@ -39,7 +38,7 @@ struct async_client
3938

4039
async_client(bool cache_resolved, bool follow_redirect,
4140
bool always_verify_peer, int timeout,
42-
boost::shared_ptr<boost::asio::io_service> service,
41+
std::shared_ptr<boost::asio::io_service> service,
4342
optional<string_type> certificate_filename,
4443
optional<string_type> verify_path,
4544
optional<string_type> certificate_file,
@@ -48,7 +47,7 @@ struct async_client
4847
: connection_base(cache_resolved, follow_redirect, timeout),
4948
service_ptr(service.get()
5049
? service
51-
: boost::make_shared<boost::asio::io_service>()),
50+
: std::make_shared<boost::asio::io_service>()),
5251
service_(*service_ptr),
5352
resolver_(service_),
5453
sentinel_(new boost::asio::io_service::work(service_)),
@@ -88,11 +87,11 @@ struct async_client
8887
generator);
8988
}
9089

91-
boost::shared_ptr<boost::asio::io_service> service_ptr;
90+
std::shared_ptr<boost::asio::io_service> service_ptr;
9291
boost::asio::io_service& service_;
9392
resolver_type resolver_;
94-
boost::shared_ptr<boost::asio::io_service::work> sentinel_;
95-
boost::shared_ptr<std::thread> lifetime_thread_;
93+
std::shared_ptr<boost::asio::io_service::work> sentinel_;
94+
std::shared_ptr<std::thread> lifetime_thread_;
9695
optional<string_type> certificate_filename_;
9796
optional<string_type> verify_path_;
9897
optional<string_type> certificate_file_;

boost/network/protocol/http/client/connection/async_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct async_connection_base {
3232
typedef function<void(char_const_range const &, system::error_code const &)>
3333
body_callback_function_type;
3434
typedef function<bool(string_type &)> body_generator_function_type;
35-
typedef shared_ptr<this_type> connection_ptr;
35+
typedef std::shared_ptr<this_type> connection_ptr;
3636

3737
// This is the factory function which constructs the appropriate async
3838
// connection implementation with the correct delegate chosen based on the

boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ template <class Tag, unsigned version_major, unsigned version_minor>
4949
struct http_async_connection
5050
: async_connection_base<Tag, version_major, version_minor>,
5151
protected http_async_protocol_handler<Tag, version_major, version_minor>,
52-
boost::enable_shared_from_this<
52+
std::enable_shared_from_this<
5353
http_async_connection<Tag, version_major, version_minor> > {
5454
http_async_connection(http_async_connection const&) = delete;
5555

boost/network/protocol/http/client/connection/connection_delegate_factory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct normal_delegate;
2828

2929
template <class Tag>
3030
struct connection_delegate_factory {
31-
typedef shared_ptr<connection_delegate> connection_delegate_ptr;
31+
typedef std::shared_ptr<connection_delegate> connection_delegate_ptr;
3232
typedef typename string<Tag>::type string_type;
3333

3434
// This is the factory method that actually returns the delegate

boost/network/protocol/http/client/connection/ssl_delegate.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <boost/asio/io_service.hpp>
1111
#include <boost/asio/ssl.hpp>
12-
#include <boost/enable_shared_from_this.hpp>
1312
#include <boost/network/protocol/http/client/connection/connection_delegate.hpp>
1413
#include <boost/network/support/is_default_string.hpp>
1514
#include <boost/network/support/is_default_wstring.hpp>
@@ -22,7 +21,7 @@ namespace http {
2221
namespace impl {
2322

2423
struct ssl_delegate : connection_delegate,
25-
enable_shared_from_this<ssl_delegate> {
24+
std::enable_shared_from_this<ssl_delegate> {
2625
ssl_delegate(asio::io_service &service, bool always_verify_peer,
2726
optional<std::string> certificate_filename,
2827
optional<std::string> verify_path,

boost/network/protocol/http/client/connection/sync_normal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ template <class Tag, unsigned version_major, unsigned version_minor>
3131
struct http_sync_connection
3232
: public virtual sync_connection_base<Tag, version_major, version_minor>,
3333
sync_connection_base_impl<Tag, version_major, version_minor>,
34-
boost::enable_shared_from_this<
34+
std::enable_shared_from_this<
3535
http_sync_connection<Tag, version_major, version_minor> > {
3636
typedef typename resolver_policy<Tag>::type resolver_base;
3737
typedef typename resolver_base::resolver_type resolver_type;

boost/network/protocol/http/client/connection/sync_ssl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ template <class Tag, unsigned version_major, unsigned version_minor>
3434
struct https_sync_connection
3535
: public virtual sync_connection_base<Tag, version_major, version_minor>,
3636
sync_connection_base_impl<Tag, version_major, version_minor>,
37-
boost::enable_shared_from_this<
37+
std::enable_shared_from_this<
3838
https_sync_connection<Tag, version_major, version_minor> > {
3939
typedef typename resolver_policy<Tag>::type resolver_base;
4040
typedef typename resolver_base::resolver_type resolver_type;

boost/network/protocol/http/client/facade.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <memory>
1011
#include <boost/network/protocol/http/client/pimpl.hpp>
1112
#include <boost/network/protocol/http/request.hpp>
1213
#include <boost/network/protocol/http/response.hpp>
@@ -299,7 +300,7 @@ class basic_client_facade {
299300
void clear_resolved_cache() { pimpl->clear_resolved_cache(); }
300301

301302
protected:
302-
boost::shared_ptr<pimpl_type> pimpl;
303+
std::shared_ptr<pimpl_type> pimpl;
303304

304305
void init_pimpl(client_options<Tag> const& options) {
305306
pimpl.reset(new pimpl_type(

boost/network/protocol/http/client/options.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <memory>
1011
#include <boost/asio/io_service.hpp>
1112
#include <boost/network/traits/string.hpp>
1213
#include <boost/optional/optional.hpp>
13-
#include <boost/smart_ptr/shared_ptr.hpp>
1414

1515
namespace boost {
1616
namespace network {
@@ -107,7 +107,7 @@ class client_options {
107107
return *this;
108108
}
109109

110-
client_options& io_service(boost::shared_ptr<boost::asio::io_service> v) {
110+
client_options& io_service(std::shared_ptr<boost::asio::io_service> v) {
111111
io_service_ = v;
112112
return *this;
113113
}
@@ -148,7 +148,7 @@ class client_options {
148148

149149
long openssl_options() const { return openssl_options_; }
150150

151-
boost::shared_ptr<boost::asio::io_service> io_service() const {
151+
std::shared_ptr<boost::asio::io_service> io_service() const {
152152
return io_service_;
153153
}
154154

@@ -165,7 +165,7 @@ class client_options {
165165
boost::optional<string_type> openssl_private_key_file_;
166166
boost::optional<string_type> openssl_ciphers_;
167167
long openssl_options_;
168-
boost::shared_ptr<boost::asio::io_service> io_service_;
168+
std::shared_ptr<boost::asio::io_service> io_service_;
169169
bool always_verify_peer_;
170170
int timeout_;
171171
};

boost/network/protocol/http/client/pimpl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9+
#include <memory>
910
#include <boost/asio/io_service.hpp>
1011
#include <boost/mpl/and.hpp>
1112
#include <boost/mpl/if.hpp>
@@ -16,7 +17,6 @@
1617
#include <boost/network/support/is_async.hpp>
1718
#include <boost/network/support/is_sync.hpp>
1819
#include <boost/optional/optional.hpp>
19-
#include <boost/smart_ptr/shared_ptr.hpp>
2020
#include <boost/static_assert.hpp>
2121

2222
namespace boost {
@@ -74,7 +74,7 @@ struct basic_client_impl
7474
optional<string_type> const& certificate_file,
7575
optional<string_type> const& private_key_file,
7676
optional<string_type> const& ciphers, long ssl_options,
77-
boost::shared_ptr<boost::asio::io_service> service,
77+
std::shared_ptr<boost::asio::io_service> service,
7878
int timeout)
7979
: base_type(cache_resolved, follow_redirect, always_verify_peer, timeout,
8080
service, certificate_filename, verify_path, certificate_file,

0 commit comments

Comments
 (0)