Skip to content

Commit 609ed29

Browse files
committed
Used macro NETWORK_NOEXCEPT instead of keyword noexcept.
1 parent 28ffad1 commit 609ed29

File tree

10 files changed

+47
-38
lines changed

10 files changed

+47
-38
lines changed

http/src/http/v2/client/client.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// http://www.boost.org/LICENSE_1_0.txt)
55

66
#include <future>
7+
#include <network/config.hpp>
78
#include <network/http/v2/client/client.hpp>
89
#include <network/http/v2/method.hpp>
910
#include <network/http/v2/client/request.hpp>
@@ -32,7 +33,7 @@ namespace network {
3233

3334
explicit impl(client_options options);
3435

35-
~impl() noexcept;
36+
~impl() NETWORK_NOEXCEPT;
3637

3738
void connect(const boost::system::error_code &ec);
3839

@@ -69,7 +70,7 @@ namespace network {
6970

7071
}
7172

72-
client::impl::~impl() noexcept {
73+
client::impl::~impl() NETWORK_NOEXCEPT {
7374
sentinel_.reset();
7475
lifetime_thread_.join();
7576
}
@@ -142,7 +143,7 @@ namespace network {
142143

143144
}
144145

145-
client::~client() noexcept {
146+
client::~client() NETWORK_NOEXCEPT {
146147
delete pimpl_;
147148
}
148149

http/src/http/v2/client/client_errors.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// (See accompanying file LICENSE_1_0.txt or copy at
44
// http://www.boost.org/LICENSE_1_0.txt)
55

6+
#include <network/config.hpp>
67
#include <network/http/v2/client/client_errors.hpp>
78

89
namespace network {
@@ -15,19 +16,19 @@ namespace network {
1516

1617
client_category_impl() = default;
1718

18-
virtual ~client_category_impl() noexcept;
19+
virtual ~client_category_impl() NETWORK_NOEXCEPT;
1920

20-
virtual const char *name() const noexcept;
21+
virtual const char *name() const NETWORK_NOEXCEPT;
2122

2223
virtual std::string message(int ev) const;
2324

2425
};
2526

26-
client_category_impl::~client_category_impl() noexcept {
27+
client_category_impl::~client_category_impl() NETWORK_NOEXCEPT {
2728

2829
}
2930

30-
const char *client_category_impl::name() const noexcept {
31+
const char *client_category_impl::name() const NETWORK_NOEXCEPT {
3132
static const char name[] = "client_error";
3233
return name;
3334
}
@@ -62,7 +63,7 @@ namespace network {
6263

6364
}
6465

65-
invalid_url::~invalid_url() noexcept {
66+
invalid_url::~invalid_url() NETWORK_NOEXCEPT {
6667

6768
}
6869

http/src/network/http/v2/client/client.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
#include <chrono>
2323
#include <boost/asio/io_service.hpp>
2424
#include <boost/optional.hpp>
25-
#include "network/http/v2/client/request.hpp"
26-
#include "network/http/v2/client/response.hpp"
25+
#include <network/config.hpp>
26+
#include <network/http/v2/client/request.hpp>
27+
#include <network/http/v2/client/response.hpp>
2728

2829
namespace network {
2930
namespace http {
@@ -68,14 +69,14 @@ namespace network {
6869
/**
6970
* \brief Destructor.
7071
*/
71-
~client_options() noexcept {
72+
~client_options() NETWORK_NOEXCEPT {
7273

7374
}
7475

7576
/**
7677
* \brief Swap.
7778
*/
78-
void swap(client_options &other) noexcept {
79+
void swap(client_options &other) NETWORK_NOEXCEPT {
7980
using std::swap;
8081
std::swap(io_service_, other.io_service_);
8182
swap(follow_redirects_, other.follow_redirects_);
@@ -227,7 +228,7 @@ namespace network {
227228
};
228229

229230
inline
230-
void swap(client_options &lhs, client_options &rhs) noexcept {
231+
void swap(client_options &lhs, client_options &rhs) NETWORK_NOEXCEPT {
231232
lhs.swap(rhs);
232233
}
233234

@@ -258,7 +259,7 @@ namespace network {
258259
/**
259260
* Destructor.
260261
*/
261-
~client() noexcept;
262+
~client() NETWORK_NOEXCEPT;
262263

263264
/**
264265
* \brief Makes an HTTP GET request.

http/src/network/http/v2/client/client_errors.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace network {
6868
/**
6969
* \brief Destructor.
7070
*/
71-
virtual ~invalid_url() noexcept;
71+
virtual ~invalid_url() NETWORK_NOEXCEPT;
7272

7373
};
7474

@@ -89,7 +89,7 @@ namespace network {
8989
/**
9090
* \brief Destructor.
9191
*/
92-
virtual ~resolver_error() noexcept;
92+
virtual ~resolver_error() NETWORK_NOEXCEPT;
9393

9494
};
9595

@@ -111,7 +111,7 @@ namespace network {
111111
/**
112112
* \brief Destructor.
113113
*/
114-
virtual ~connection_error() noexcept;
114+
virtual ~connection_error() NETWORK_NOEXCEPT;
115115

116116
};
117117

@@ -132,7 +132,7 @@ namespace network {
132132
/**
133133
* \brief Destructor.
134134
*/
135-
virtual ~response_error() noexcept;
135+
virtual ~response_error() NETWORK_NOEXCEPT;
136136

137137
};
138138
} // namespace v2

http/src/network/http/v2/client/connection/async_resolver.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <boost/asio/ip/tcp.hpp>
1818
#include <boost/algorithm/string/case_conv.hpp>
1919
#include <boost/exception/all.hpp>
20+
#include <network/config.hpp>
2021

2122
namespace network {
2223
namespace http {
@@ -55,7 +56,7 @@ namespace network {
5556
/**
5657
* \brief Destructor.
5758
*/
58-
~async_resolver() noexcept {
59+
~async_resolver() NETWORK_NOEXCEPT {
5960

6061
}
6162

http/src/network/http/v2/client/connection/connection.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <boost/asio/ip/tcp.hpp>
1212
#include <boost/asio/streambuf.hpp>
1313
#include <boost/asio/buffer.hpp>
14+
#include <network/config.hpp>
1415

1516
namespace network {
1617
namespace http {
@@ -49,7 +50,7 @@ namespace network {
4950
/**
5051
* \brief Destructor.
5152
*/
52-
virtual ~connection() noexcept { }
53+
virtual ~connection() NETWORK_NOEXCEPT { }
5354

5455
/**
5556
* \brief Asynchronously creates a connection to an endpoint.

http/src/network/http/v2/client/connection/normal_connection.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <boost/asio/read_until.hpp>
1111
#include <boost/asio/ip/tcp.hpp>
1212
#include <boost/asio/io_service.hpp>
13+
#include <network/config.hpp>
1314
#include <network/http/v2/client/connection/connection.hpp>
1415

1516
namespace network {
@@ -27,7 +28,7 @@ namespace network {
2728

2829
}
2930

30-
virtual ~normal_connection() noexcept {
31+
virtual ~normal_connection() NETWORK_NOEXCEPT {
3132

3233
}
3334

http/src/network/http/v2/client/connection/ssl_connection.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
#ifndef __NETWORK_HTTP_V2_CLIENT_CONNECTION_SSL_CONNECTION_INC__
77
#define __NETWORK_HTTP_V2_CLIENT_CONNECTION_SSL_CONNECTION_INC__
88

9-
#include <network/http/v2/client/connection/connection.hpp>
10-
#include <network/http/v2/client/client.hpp>
119
#include <memory>
1210
#include <vector>
1311
#include <boost/asio/ip/tcp.hpp>
1412
#include <boost/asio/io_service.hpp>
1513
#include <boost/asio/ssl.hpp>
1614
#include <boost/asio/placeholders.hpp>
15+
#include <network/config.hpp>
16+
#include <network/http/v2/client/connection/connection.hpp>
17+
#include <network/http/v2/client/client.hpp>
1718

1819
namespace network {
1920
namespace http {
@@ -32,7 +33,7 @@ namespace network {
3233

3334
}
3435

35-
virtual ~ssl_connection() noexcept {
36+
virtual ~ssl_connection() NETWORK_NOEXCEPT {
3637

3738
}
3839

http/src/network/http/v2/client/request.hpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
#include <boost/range/iterator_range.hpp>
2626
#include <boost/range/algorithm/equal.hpp>
2727
#include <boost/range/as_literal.hpp>
28-
#include "network/http/v2/method.hpp"
29-
#include "network/http/v2/client/client_errors.hpp"
30-
#include "network/uri.hpp"
28+
#include <network/config.hpp>
29+
#include <network/http/v2/method.hpp>
30+
#include <network/http/v2/client/client_errors.hpp>
31+
#include <network/uri.hpp>
3132

3233
namespace network {
3334
namespace http {
@@ -71,11 +72,11 @@ namespace network {
7172
/**
7273
* \brief Destructor.
7374
*/
74-
~request_options() noexcept {
75+
~request_options() NETWORK_NOEXCEPT {
7576

7677
}
7778

78-
void swap(request_options &other) noexcept {
79+
void swap(request_options &other) NETWORK_NOEXCEPT {
7980
using std::swap;
8081
swap(resolve_timeout_, other.resolve_timeout_);
8182
swap(read_timeout_, other.read_timeout_);
@@ -128,7 +129,7 @@ namespace network {
128129
};
129130

130131
inline
131-
void swap(request_options &lhs, request_options &rhs) noexcept {
132+
void swap(request_options &lhs, request_options &rhs) NETWORK_NOEXCEPT {
132133
lhs.swap(rhs);
133134
}
134135

@@ -157,7 +158,7 @@ namespace network {
157158
/**
158159
* \brief Destructor.
159160
*/
160-
virtual ~byte_source() noexcept {}
161+
virtual ~byte_source() NETWORK_NOEXCEPT {}
161162

162163
/**
163164
* \brief Allows the request to read the data into a local
@@ -270,7 +271,7 @@ namespace network {
270271
/**
271272
* \brief Move constructor.
272273
*/
273-
request(request &&other) noexcept
274+
request(request &&other) NETWORK_NOEXCEPT
274275
: method_(std::move(other.method_))
275276
, path_(std::move(other.path_))
276277
, version_(std::move(other.version_))
@@ -288,14 +289,14 @@ namespace network {
288289
/**
289290
* \brief Destructor.
290291
*/
291-
~request() noexcept {
292+
~request() NETWORK_NOEXCEPT {
292293

293294
}
294295

295296
/**
296297
* \brief Swap.
297298
*/
298-
void swap(request &other) noexcept {
299+
void swap(request &other) NETWORK_NOEXCEPT {
299300
using std::swap;
300301
swap(method_, other.method_);
301302
swap(path_, other.path_);
@@ -411,7 +412,7 @@ namespace network {
411412
};
412413

413414
inline
414-
void swap(request &lhs, request &rhs) noexcept {
415+
void swap(request &lhs, request &rhs) NETWORK_NOEXCEPT {
415416
lhs.swap(rhs);
416417
}
417418
} // namespace v2

http/src/network/http/v2/client/response.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <future>
1616
#include <network/http/v2/status.hpp>
1717
#include <boost/range/iterator_range.hpp>
18+
#include <network/config.hpp>
1819
#include <network/uri.hpp>
1920

2021
namespace network {
@@ -72,7 +73,7 @@ namespace network {
7273
* \brief Move constructor.
7374
* \param other The other response object.
7475
*/
75-
response(response &&other) noexcept
76+
response(response &&other) NETWORK_NOEXCEPT
7677
: version_(std::move(other.version_))
7778
, status_(std::move(other.status_))
7879
, status_message_(std::move(other.status_message_))
@@ -93,7 +94,7 @@ namespace network {
9394
* \brief Swap function.
9495
* \param other The other response object.
9596
*/
96-
void swap(response &other) noexcept {
97+
void swap(response &other) NETWORK_NOEXCEPT {
9798
using std::swap;
9899
swap(version_, other.version_);
99100
swap(status_, other.status_);
@@ -152,7 +153,7 @@ namespace network {
152153
};
153154

154155
inline
155-
void swap(response &lhs, response &rhs) noexcept {
156+
void swap(response &lhs, response &rhs) NETWORK_NOEXCEPT {
156157
lhs.swap(rhs);
157158
}
158159
} // namespace v2

0 commit comments

Comments
 (0)