Skip to content

Commit d81c429

Browse files
committed
Replaced BOOST_STATIC_ASSERT with static_assert.
1 parent d6885cf commit d81c429

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <boost/network/support/is_async.hpp>
1818
#include <boost/network/support/is_sync.hpp>
1919
#include <boost/optional/optional.hpp>
20-
#include <boost/static_assert.hpp>
2120

2221
namespace boost {
2322
namespace network {
@@ -60,8 +59,8 @@ class basic_client;
6059
template <class Tag, unsigned version_major, unsigned version_minor>
6160
struct basic_client_impl
6261
: impl::client_base<Tag, version_major, version_minor>::type {
63-
BOOST_STATIC_ASSERT(
64-
(mpl::not_<mpl::and_<is_async<Tag>, is_sync<Tag> > >::value));
62+
static_assert(mpl::not_<mpl::and_<is_async<Tag>, is_sync<Tag> > >::value,
63+
"Client can only be synchronous our asynchronous.");
6564

6665
typedef typename impl::client_base<Tag, version_major, version_minor>::type
6766
base_type;

boost/network/protocol/http/traits/resolver.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <boost/network/support/is_tcp.hpp>
1616
#include <boost/network/support/is_udp.hpp>
1717
#include <boost/network/protocol/http/support/is_http.hpp>
18-
#include <boost/static_assert.hpp>
1918

2019
namespace boost {
2120
namespace network {
@@ -31,8 +30,8 @@ struct resolver
3130
typename mpl::if_<mpl::and_<is_udp<Tag>, is_http<Tag> >,
3231
boost::asio::ip::udp::resolver,
3332
unsupported_tag<Tag> >::type> {
34-
BOOST_STATIC_ASSERT(
35-
(mpl::not_<mpl::and_<is_udp<Tag>, is_tcp<Tag> > >::value));
33+
static_assert(mpl::not_<mpl::and_<is_udp<Tag>, is_tcp<Tag> > >::value,
34+
"Transport protocol must be TCP or UDP");
3635
};
3736

3837
} // namespace http

boost/network/support/is_tcp.hpp

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

99
#include <boost/mpl/not.hpp>
1010
#include <boost/network/tags.hpp>
11-
#include <boost/static_assert.hpp>
1211
#include <boost/utility/enable_if.hpp>
1312

1413
namespace boost {
@@ -25,4 +24,4 @@ struct is_tcp<Tag,
2524

2625
} // namespace boost
2726

28-
#endif // BOOST_NETWORK_SUPPORT_IS_TCP_HPP_20100622
27+
#endif // BOOST_NETWORK_SUPPORT_IS_TCP_HPP_20100622

boost/network/support/is_udp.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <boost/mpl/not.hpp>
1010
#include <boost/network/support/is_tcp.hpp>
1111
#include <boost/network/tags.hpp>
12-
#include <boost/static_assert.hpp>
1312
#include <boost/utility/enable_if.hpp>
1413

1514
namespace boost {

0 commit comments

Comments
 (0)