diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a2248b6..1593b7b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,6 @@ set(BOOST_BEAST_DEPENDENCIES Boost::optional Boost::preprocessor Boost::smart_ptr - Boost::static_assert Boost::static_string Boost::system Boost::throw_exception diff --git a/build.jam b/build.jam index 0a7f93a1..ccee2545 100644 --- a/build.jam +++ b/build.jam @@ -22,7 +22,6 @@ constant boost_dependencies : /boost/optional//boost_optional /boost/preprocessor//boost_preprocessor /boost/smart_ptr//boost_smart_ptr - /boost/static_assert//boost_static_assert /boost/static_string//boost_static_string /boost/system//boost_system /boost/throw_exception//boost_throw_exception diff --git a/include/boost/beast/core/detail/config.hpp b/include/boost/beast/core/detail/config.hpp index ea84a3ac..50ac73ab 100644 --- a/include/boost/beast/core/detail/config.hpp +++ b/include/boost/beast/core/detail/config.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include namespace boost { diff --git a/include/boost/beast/core/detail/remap_post_to_defer.hpp b/include/boost/beast/core/detail/remap_post_to_defer.hpp index 850a833b..8cf156d6 100644 --- a/include/boost/beast/core/detail/remap_post_to_defer.hpp +++ b/include/boost/beast/core/detail/remap_post_to_defer.hpp @@ -23,7 +23,7 @@ template class remap_post_to_defer : private boost::empty_value { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_executor::value); Executor const& diff --git a/include/boost/beast/core/detail/varint.hpp b/include/boost/beast/core/detail/varint.hpp index 37f0b9d1..745c7c16 100644 --- a/include/boost/beast/core/detail/varint.hpp +++ b/include/boost/beast/core/detail/varint.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_BEAST_DETAIL_VARINT_HPP #define BOOST_BEAST_DETAIL_VARINT_HPP -#include +#include #include #include #include @@ -40,7 +40,7 @@ varint_read(FwdIt& first) { using value_type = typename std::iterator_traits::value_type; - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_integral::value && sizeof(value_type) == 1); std::size_t value = 0; @@ -60,7 +60,7 @@ varint_write(FwdIt& first, std::size_t value) { using value_type = typename std::iterator_traits::value_type; - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_integral::value && sizeof(value_type) == 1); while(value > 127) diff --git a/include/boost/beast/core/flat_stream.hpp b/include/boost/beast/core/flat_stream.hpp index d1df1afe..65f1a63c 100644 --- a/include/boost/beast/core/flat_stream.hpp +++ b/include/boost/beast/core/flat_stream.hpp @@ -95,7 +95,7 @@ class flat_stream NextLayer stream_; flat_buffer buffer_; - BOOST_STATIC_ASSERT(has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(has_get_executor::value); struct ops; diff --git a/include/boost/beast/core/impl/buffers_prefix.hpp b/include/boost/beast/core/impl/buffers_prefix.hpp index e4a484bc..7ad509d5 100644 --- a/include/boost/beast/core/impl/buffers_prefix.hpp +++ b/include/boost/beast/core/impl/buffers_prefix.hpp @@ -43,7 +43,7 @@ public: using value_type = buffers_type; #endif - BOOST_STATIC_ASSERT(std::is_same< + BOOST_CORE_STATIC_ASSERT(std::is_same< typename const_iterator::value_type, typename buffers_prefix_view::value_type>::value); @@ -156,7 +156,7 @@ setup(std::size_t size) size_ += size; // by design, this subtraction can wrap - BOOST_STATIC_ASSERT(std::is_unsigned< + BOOST_CORE_STATIC_ASSERT(std::is_unsigned< decltype(remain_)>::value); remain_ = size - len; break; diff --git a/include/boost/beast/core/rate_policy.hpp b/include/boost/beast/core/rate_policy.hpp index 23798fbc..d3ac202e 100644 --- a/include/boost/beast/core/rate_policy.hpp +++ b/include/boost/beast/core/rate_policy.hpp @@ -11,7 +11,7 @@ #define BOOST_BEAST_CORE_RATE_POLICY_HPP #include -#include +#include #include namespace boost { diff --git a/include/boost/beast/http/detail/rfc7230.ipp b/include/boost/beast/http/detail/rfc7230.ipp index 4d69e772..3efa1032 100644 --- a/include/boost/beast/http/detail/rfc7230.ipp +++ b/include/boost/beast/http/detail/rfc7230.ipp @@ -46,7 +46,7 @@ is_alpha(char c) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return tab[static_cast(c)]; } @@ -72,7 +72,7 @@ is_text(char c) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 224 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return tab[static_cast(c)]; } @@ -103,7 +103,7 @@ is_token_char(char c) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return tab[static_cast(c)]; } @@ -131,7 +131,7 @@ is_qdchar(char c) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 224 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return tab[static_cast(c)]; } @@ -160,7 +160,7 @@ is_qpchar(char c) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 224 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return tab[static_cast(c)]; } @@ -189,7 +189,7 @@ to_value_char(char c) 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, // 224 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return static_cast(tab[static_cast(c)]); } @@ -215,7 +215,7 @@ unhex(char c) -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // 240 }; - BOOST_STATIC_ASSERT(sizeof(tab) == 256); + BOOST_CORE_STATIC_ASSERT(sizeof(tab) == 256); return tab[static_cast(c)]; } diff --git a/include/boost/beast/http/impl/fields.ipp b/include/boost/beast/http/impl/fields.ipp index 379d0a4d..487f0528 100644 --- a/include/boost/beast/http/impl/fields.ipp +++ b/include/boost/beast/http/impl/fields.ipp @@ -20,7 +20,7 @@ namespace detail { // `basic_fields` assumes that `std::size_t` is larger than `uint16_t`, so we // verify it explicitly here, so that users that use split compilation don't // need to pay the (fairly small) price for this sanity check -BOOST_STATIC_ASSERT((std::numeric_limits::max)() >= +BOOST_CORE_STATIC_ASSERT((std::numeric_limits::max)() >= (std::numeric_limits::max)()); // Filter a token list diff --git a/include/boost/beast/http/parser.hpp b/include/boost/beast/http/parser.hpp index f7459a71..3e00a15e 100644 --- a/include/boost/beast/http/parser.hpp +++ b/include/boost/beast/http/parser.hpp @@ -248,7 +248,7 @@ public: { // Callback may not be constant, caller is responsible for // managing the lifetime of the callback. Copies are not made. - BOOST_STATIC_ASSERT(! std::is_const::value); + BOOST_CORE_STATIC_ASSERT(! std::is_const::value); // Can't set the callback after receiving any chunk data! BOOST_ASSERT(! rd_inited_); @@ -296,7 +296,7 @@ public: { // Callback may not be constant, caller is responsible for // managing the lifetime of the callback. Copies are not made. - BOOST_STATIC_ASSERT(! std::is_const::value); + BOOST_CORE_STATIC_ASSERT(! std::is_const::value); // Can't set the callback after receiving any chunk data! BOOST_ASSERT(! rd_inited_); diff --git a/include/boost/beast/websocket/option.hpp b/include/boost/beast/websocket/option.hpp index 4c4e4ee6..d88fefff 100644 --- a/include/boost/beast/websocket/option.hpp +++ b/include/boost/beast/websocket/option.hpp @@ -12,6 +12,8 @@ #include +#include + namespace boost { namespace beast { namespace websocket { diff --git a/include/boost/beast/zlib/detail/deflate_stream.hpp b/include/boost/beast/zlib/detail/deflate_stream.hpp index 93ef5789..6f395690 100644 --- a/include/boost/beast/zlib/detail/deflate_stream.hpp +++ b/include/boost/beast/zlib/detail/deflate_stream.hpp @@ -87,7 +87,7 @@ protected: static std::uint16_t constexpr maxMatch = 258; // Can't change minMatch without also changing code, see original zlib - BOOST_STATIC_ASSERT(minMatch == 3); + BOOST_CORE_STATIC_ASSERT(minMatch == 3); // end of block literal code static std::uint16_t constexpr end_block = 256; @@ -698,7 +698,7 @@ Unsigned deflate_stream:: bi_reverse(Unsigned code, unsigned len) { - BOOST_STATIC_ASSERT(std::is_unsigned::value); + BOOST_CORE_STATIC_ASSERT(std::is_unsigned::value); BOOST_ASSERT(len <= 8 * sizeof(unsigned)); Unsigned res = 0; do diff --git a/test/beast/_experimental/stream.cpp b/test/beast/_experimental/stream.cpp index 9d7ab595..adb13041 100644 --- a/test/beast/_experimental/stream.cpp +++ b/test/beast/_experimental/stream.cpp @@ -150,7 +150,7 @@ public: void testAsioSSLCompat() { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< boost::asio::ssl::stream:: lowest_layer_type, diff --git a/test/beast/core/_detail_is_invocable.cpp b/test/beast/core/_detail_is_invocable.cpp index e412ef18..807ce17b 100644 --- a/test/beast/core/_detail_is_invocable.cpp +++ b/test/beast/core/_detail_is_invocable.cpp @@ -43,14 +43,14 @@ struct is_invocable_udt4 #ifndef __INTELLISENSE__ // VFALCO Fails to compile with Intellisense -BOOST_STATIC_ASSERT(is_invocable::value); -BOOST_STATIC_ASSERT(is_invocable::value); -BOOST_STATIC_ASSERT(is_invocable::value); -BOOST_STATIC_ASSERT(! is_invocable::value); -BOOST_STATIC_ASSERT(! is_invocable::value); -BOOST_STATIC_ASSERT(! is_invocable::value); -BOOST_STATIC_ASSERT(! is_invocable::value); -BOOST_STATIC_ASSERT(is_invocable)>::value); +BOOST_CORE_STATIC_ASSERT(is_invocable::value); +BOOST_CORE_STATIC_ASSERT(is_invocable::value); +BOOST_CORE_STATIC_ASSERT(is_invocable::value); +BOOST_CORE_STATIC_ASSERT(! is_invocable::value); +BOOST_CORE_STATIC_ASSERT(! is_invocable::value); +BOOST_CORE_STATIC_ASSERT(! is_invocable::value); +BOOST_CORE_STATIC_ASSERT(! is_invocable::value); +BOOST_CORE_STATIC_ASSERT(is_invocable)>::value); #endif } // (anonymous) diff --git a/test/beast/core/async_base.cpp b/test/beast/core/async_base.cpp index 42279791..ee60efb0 100644 --- a/test/beast/core/async_base.cpp +++ b/test/beast/core/async_base.cpp @@ -83,7 +83,7 @@ struct ex1_type operator!=(ex1_type const &) const noexcept { return false; } }; -BOOST_STATIC_ASSERT(net::execution::is_executor::value); +BOOST_CORE_STATIC_ASSERT(net::execution::is_executor::value); #else struct ex1_type { @@ -94,7 +94,7 @@ struct ex1_type template void post(F&&) {} template void defer(F&&) {} }; -BOOST_STATIC_ASSERT(net::is_executor::value); +BOOST_CORE_STATIC_ASSERT(net::is_executor::value); #endif @@ -251,7 +251,7 @@ class async_base_test : public beast::unit_test::suite public: // no associated allocator - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< std::allocator, net::associated_allocator_t< @@ -260,7 +260,7 @@ public: net::io_context::executor_type> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< std::allocator, net::associated_allocator_t< @@ -270,7 +270,7 @@ public: std::allocator> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< std::allocator, net::associated_allocator_t< @@ -280,7 +280,7 @@ public: std::allocator // ignored >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< std::allocator, net::associated_allocator_t< @@ -293,7 +293,7 @@ public: // nested associated allocator - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< nested_alloc::allocator_type, net::associated_allocator_t< @@ -302,7 +302,7 @@ public: net::io_context::executor_type> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< nested_alloc::allocator_type, net::associated_allocator_t< @@ -312,7 +312,7 @@ public: std::allocator> // ignored >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< nested_alloc::allocator_type, net::associated_allocator_t< @@ -322,7 +322,7 @@ public: std::allocator // ignored >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< nested_alloc::allocator_type, net::associated_allocator_t< @@ -335,7 +335,7 @@ public: // intrusive associated allocator - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< intrusive_alloc::allocator_type, net::associated_allocator_t< @@ -344,7 +344,7 @@ public: net::io_context::executor_type> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< intrusive_alloc::allocator_type, net::associated_allocator_t< @@ -354,7 +354,7 @@ public: std::allocator> // ignored >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< intrusive_alloc::allocator_type, net::associated_allocator_t< @@ -364,7 +364,7 @@ public: std::allocator // ignored >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< intrusive_alloc::allocator_type, net::associated_allocator_t< @@ -377,7 +377,7 @@ public: // no associated executor - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< ex1_type, net::associated_executor_t< @@ -386,7 +386,7 @@ public: ex1_type> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< ex1_type, net::associated_executor_t< @@ -398,7 +398,7 @@ public: // nested associated executor - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< nested_ex::executor_type, net::associated_executor_t< @@ -407,7 +407,7 @@ public: ex1_type> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< nested_ex::executor_type, net::associated_executor_t< @@ -419,7 +419,7 @@ public: // intrusive associated executor - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< intrusive_ex::executor_type, net::associated_executor_t< @@ -428,7 +428,7 @@ public: ex1_type> >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same< intrusive_ex::executor_type, net::associated_executor_t< diff --git a/test/beast/core/basic_stream.cpp b/test/beast/core/basic_stream.cpp index 4daf4e5c..2db8d639 100644 --- a/test/beast/core/basic_stream.cpp +++ b/test/beast/core/basic_stream.cpp @@ -1267,7 +1267,7 @@ public: net::strand< net::io_context::executor_type>, unlimited_rate_policy> stream(std::move(sock)); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_convertible< decltype(sock)::executor_type, decltype(stream)::executor_type>::value); diff --git a/test/beast/core/bind_handler.cpp b/test/beast/core/bind_handler.cpp index 480129c5..1a074dd0 100644 --- a/test/beast/core/bind_handler.cpp +++ b/test/beast/core/bind_handler.cpp @@ -249,9 +249,9 @@ public: }; #if defined(BOOST_ASIO_NO_TS_EXECUTORS) - BOOST_STATIC_ASSERT(net::execution::is_executor::value); + BOOST_CORE_STATIC_ASSERT(net::execution::is_executor::value); #else - BOOST_STATIC_ASSERT(net::is_executor::value); + BOOST_CORE_STATIC_ASSERT(net::is_executor::value); #endif class test_cb diff --git a/test/beast/core/buffer_traits.cpp b/test/beast/core/buffer_traits.cpp index ae8b6b6e..90aa2281 100644 --- a/test/beast/core/buffer_traits.cpp +++ b/test/beast/core/buffer_traits.cpp @@ -56,120 +56,120 @@ class buffer_traits_test : public beast::unit_test::suite public: // is_const_buffer_sequence - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::const_buffer >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::const_buffer, net::const_buffer >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::const_buffer, net::mutable_buffer >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::mutable_buffer, net::mutable_buffer >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::const_buffer const& >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::const_buffer const&, net::const_buffer const& >::value); - BOOST_STATIC_ASSERT(is_const_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_const_buffer_sequence< net::const_buffer const&, net::mutable_buffer const& >::value); // is_mutable_buffer_sequence - BOOST_STATIC_ASSERT(is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_mutable_buffer_sequence< >::value); - BOOST_STATIC_ASSERT(is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_mutable_buffer_sequence< net::mutable_buffer >::value); - BOOST_STATIC_ASSERT(is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_mutable_buffer_sequence< net::mutable_buffer, net::mutable_buffer >::value); - BOOST_STATIC_ASSERT(! is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(! is_mutable_buffer_sequence< net::const_buffer, net::const_buffer >::value); - BOOST_STATIC_ASSERT(! is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(! is_mutable_buffer_sequence< net::const_buffer, net::mutable_buffer >::value); - BOOST_STATIC_ASSERT(is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_mutable_buffer_sequence< net::mutable_buffer const& >::value); - BOOST_STATIC_ASSERT(is_mutable_buffer_sequence< + BOOST_CORE_STATIC_ASSERT(is_mutable_buffer_sequence< net::mutable_buffer const&, net::mutable_buffer const& >::value); // buffers_type - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same >>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same >>::value); // buffers_iterator_type - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_same>::value); @@ -224,7 +224,7 @@ public: BEAST_EXPECT(buffer_bytes(s) == 26); } - BOOST_STATIC_ASSERT(! detail::is_invocable< + BOOST_CORE_STATIC_ASSERT(! detail::is_invocable< detail::buffer_bytes_impl, std::size_t(not_sequence const&)>::value); } diff --git a/test/beast/core/buffers_adaptor.cpp b/test/beast/core/buffers_adaptor.cpp index ce4acf35..6e92d0d4 100644 --- a/test/beast/core/buffers_adaptor.cpp +++ b/test/beast/core/buffers_adaptor.cpp @@ -57,7 +57,7 @@ struct buffers_adaptor_test_hook class buffers_adaptor_test : public unit_test::suite { public: - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_mutable_dynamic_buffer< buffers_adaptor>::value); diff --git a/test/beast/core/buffers_range.cpp b/test/beast/core/buffers_range.cpp index 12a5ece3..d809841d 100644 --- a/test/beast/core/buffers_range.cpp +++ b/test/beast/core/buffers_range.cpp @@ -20,22 +20,22 @@ namespace beast { class buffers_range_test : public beast::unit_test::suite { public: - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_const_buffer_sequence< decltype(beast::buffers_range( std::declval()))>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_const_buffer_sequence< decltype(beast::buffers_range( std::declval()))>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! net::is_mutable_buffer_sequence< decltype(beast::buffers_range( std::declval()))>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_mutable_buffer_sequence< decltype(beast::buffers_range( std::declval()))>::value); diff --git a/test/beast/core/file_posix.cpp b/test/beast/core/file_posix.cpp index 23bfe8f0..146ae76b 100644 --- a/test/beast/core/file_posix.cpp +++ b/test/beast/core/file_posix.cpp @@ -19,7 +19,7 @@ namespace boost { namespace beast { -BOOST_STATIC_ASSERT(! std::is_copy_constructible::value); +BOOST_CORE_STATIC_ASSERT(! std::is_copy_constructible::value); class file_posix_test : public beast::unit_test::suite diff --git a/test/beast/core/file_stdio.cpp b/test/beast/core/file_stdio.cpp index 3af8400c..83fa8797 100644 --- a/test/beast/core/file_stdio.cpp +++ b/test/beast/core/file_stdio.cpp @@ -17,7 +17,7 @@ namespace boost { namespace beast { -BOOST_STATIC_ASSERT(! std::is_copy_constructible::value); +BOOST_CORE_STATIC_ASSERT(! std::is_copy_constructible::value); class file_stdio_test : public beast::unit_test::suite diff --git a/test/beast/core/file_test.hpp b/test/beast/core/file_test.hpp index 9e07c8e5..e5a54b9d 100644 --- a/test/beast/core/file_test.hpp +++ b/test/beast/core/file_test.hpp @@ -32,11 +32,11 @@ template void test_file() { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_file::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! std::is_copy_constructible::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! std::is_copy_assignable::value); namespace fs = boost::filesystem; diff --git a/test/beast/core/flat_buffer.cpp b/test/beast/core/flat_buffer.cpp index f3193cec..a17acfe9 100644 --- a/test/beast/core/flat_buffer.cpp +++ b/test/beast/core/flat_buffer.cpp @@ -26,7 +26,7 @@ namespace beast { class flat_buffer_test : public beast::unit_test::suite { public: - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_mutable_dynamic_buffer::value); void @@ -300,7 +300,7 @@ public: { basic_flat_buffer b; auto a = b.get_allocator(); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! std::is_const::value); a->max_size = 30; try diff --git a/test/beast/core/flat_static_buffer.cpp b/test/beast/core/flat_static_buffer.cpp index a74eaad9..d70338e5 100644 --- a/test/beast/core/flat_static_buffer.cpp +++ b/test/beast/core/flat_static_buffer.cpp @@ -28,7 +28,7 @@ namespace beast { class flat_static_buffer_test : public beast::unit_test::suite { public: - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_mutable_dynamic_buffer< flat_static_buffer<13>>::value); diff --git a/test/beast/core/multi_buffer.cpp b/test/beast/core/multi_buffer.cpp index 8ee966e2..cc325439 100644 --- a/test/beast/core/multi_buffer.cpp +++ b/test/beast/core/multi_buffer.cpp @@ -32,14 +32,14 @@ namespace beast { class multi_buffer_test : public beast::unit_test::suite { public: - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_mutable_dynamic_buffer::value); #if ! BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION, < 50000) && \ ! BOOST_WORKAROUND(BOOST_MSVC, < 1910) -// BOOST_STATIC_ASSERT(std::is_trivially_copyable< +// BOOST_CORE_STATIC_ASSERT(std::is_trivially_copyable< // multi_buffer::const_buffers_type>::value); -// BOOST_STATIC_ASSERT(std::is_trivially_copyable< +// BOOST_CORE_STATIC_ASSERT(std::is_trivially_copyable< // multi_buffer::mutable_data_type>::value); #endif @@ -379,7 +379,7 @@ public: { basic_multi_buffer b; auto a = b.get_allocator(); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! std::is_const::value); a->max_size = 30; try diff --git a/test/beast/core/static_buffer.cpp b/test/beast/core/static_buffer.cpp index 9a8b55a7..4bf17f6e 100644 --- a/test/beast/core/static_buffer.cpp +++ b/test/beast/core/static_buffer.cpp @@ -28,11 +28,11 @@ namespace beast { class static_buffer_test : public beast::unit_test::suite { public: - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_mutable_dynamic_buffer< static_buffer<13>>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_mutable_dynamic_buffer< static_buffer_base>::value); diff --git a/test/beast/core/stream_traits.cpp b/test/beast/core/stream_traits.cpp index 348ff9ff..8f088690 100644 --- a/test/beast/core/stream_traits.cpp +++ b/test/beast/core/stream_traits.cpp @@ -65,13 +65,13 @@ public: } }; - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! detail::has_next_layer::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( detail::has_next_layer>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( detail::has_next_layer>>::value); void @@ -169,9 +169,9 @@ public: testGetLowestLayerJavadoc() { write_stream s; - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( is_sync_write_stream::value); - BOOST_STATIC_ASSERT(std::is_same< + BOOST_CORE_STATIC_ASSERT(std::is_same< decltype(get_lowest_layer(s)), without&>::value); #if 0 @@ -238,37 +238,37 @@ public: void async_write_some(ConstBufferSequence const&, WriteHandler&&); }; - BOOST_STATIC_ASSERT(is_sync_read_stream::value); - BOOST_STATIC_ASSERT(is_sync_read_stream::value); - BOOST_STATIC_ASSERT(is_sync_write_stream::value); - BOOST_STATIC_ASSERT(is_sync_write_stream::value); - BOOST_STATIC_ASSERT(is_sync_stream::value); + BOOST_CORE_STATIC_ASSERT(is_sync_read_stream::value); + BOOST_CORE_STATIC_ASSERT(is_sync_read_stream::value); + BOOST_CORE_STATIC_ASSERT(is_sync_write_stream::value); + BOOST_CORE_STATIC_ASSERT(is_sync_write_stream::value); + BOOST_CORE_STATIC_ASSERT(is_sync_stream::value); - BOOST_STATIC_ASSERT(! is_sync_read_stream::value); - BOOST_STATIC_ASSERT(! is_sync_write_stream::value); - BOOST_STATIC_ASSERT(! is_sync_stream::value); + BOOST_CORE_STATIC_ASSERT(! is_sync_read_stream::value); + BOOST_CORE_STATIC_ASSERT(! is_sync_write_stream::value); + BOOST_CORE_STATIC_ASSERT(! is_sync_stream::value); - BOOST_STATIC_ASSERT(has_get_executor::value); - BOOST_STATIC_ASSERT(has_get_executor::value); - BOOST_STATIC_ASSERT(has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(has_get_executor::value); - BOOST_STATIC_ASSERT(! has_get_executor::value); - BOOST_STATIC_ASSERT(! has_get_executor::value); - BOOST_STATIC_ASSERT(! has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(! has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(! has_get_executor::value); + BOOST_CORE_STATIC_ASSERT(! has_get_executor::value); - BOOST_STATIC_ASSERT(is_async_read_stream::value); - BOOST_STATIC_ASSERT(is_async_read_stream::value); + BOOST_CORE_STATIC_ASSERT(is_async_read_stream::value); + BOOST_CORE_STATIC_ASSERT(is_async_read_stream::value); #if BOOST_WORKAROUND(BOOST_MSVC, < 1910) - BOOST_STATIC_ASSERT(is_async_write_stream::value); + BOOST_CORE_STATIC_ASSERT(is_async_write_stream::value); #else - BOOST_STATIC_ASSERT(is_async_write_stream::value); + BOOST_CORE_STATIC_ASSERT(is_async_write_stream::value); #endif - BOOST_STATIC_ASSERT(is_async_write_stream::value); - BOOST_STATIC_ASSERT(is_async_stream::value); + BOOST_CORE_STATIC_ASSERT(is_async_write_stream::value); + BOOST_CORE_STATIC_ASSERT(is_async_stream::value); - BOOST_STATIC_ASSERT(! is_async_write_stream::value); - BOOST_STATIC_ASSERT(! is_async_read_stream::value); - BOOST_STATIC_ASSERT(! is_async_stream::value); + BOOST_CORE_STATIC_ASSERT(! is_async_write_stream::value); + BOOST_CORE_STATIC_ASSERT(! is_async_read_stream::value); + BOOST_CORE_STATIC_ASSERT(! is_async_stream::value); //-------------------------------------------------------------------------- @@ -306,13 +306,13 @@ public: type layer(ioc); layer.next_layer().open(net::ip::tcp::v4()); BEAST_EXPECT(layer.next_layer().is_open()); - BOOST_STATIC_ASSERT(detail::has_next_layer::value); - BOOST_STATIC_ASSERT((std::is_same< + BOOST_CORE_STATIC_ASSERT(detail::has_next_layer::value); + BOOST_CORE_STATIC_ASSERT((std::is_same< typename std::decay::type, lowest_layer_type>::value)); - BOOST_STATIC_ASSERT(std::is_same::value); - BOOST_STATIC_ASSERT(std::is_same>::value); close_socket(get_lowest_layer(layer)); BEAST_EXPECT(! layer.next_layer().is_open()); diff --git a/test/beast/core/test_buffer.hpp b/test/beast/core/test_buffer.hpp index 6505f40a..d534bc29 100644 --- a/test/beast/core/test_buffer.hpp +++ b/test/beast/core/test_buffer.hpp @@ -137,7 +137,7 @@ void test_buffer_sequence( ConstBufferSequence const& buffers) { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_const_buffer_sequence< ConstBufferSequence>::value); @@ -289,11 +289,11 @@ test_mutable_dynamic_buffer( MutableDynamicBuffer_v0 const& b0, std::true_type) { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_mutable_buffer_sequence::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_convertible< typename MutableDynamicBuffer_v0::mutable_buffers_type, typename MutableDynamicBuffer_v0::const_buffers_type>::value); @@ -369,14 +369,14 @@ void test_dynamic_buffer( DynamicBuffer_v0 const& b0) { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_dynamic_buffer_v1::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_const_buffer_sequence::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_mutable_buffer_sequence::value); @@ -604,14 +604,14 @@ template void test_dynamic_buffer_ref(DynamicBuffer_v0 b0) { - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_dynamic_buffer_v1::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_const_buffer_sequence::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( net::is_mutable_buffer_sequence::value); diff --git a/test/beast/core/test_handler.hpp b/test/beast/core/test_handler.hpp index 340af6b4..d44e00ba 100644 --- a/test/beast/core/test_handler.hpp +++ b/test/beast/core/test_handler.hpp @@ -97,7 +97,7 @@ public: }; #if defined(BOOST_ASIO_NO_TS_EXECUTORS) -BOOST_STATIC_ASSERT(net::execution::is_executor::value); +BOOST_CORE_STATIC_ASSERT(net::execution::is_executor::value); #endif // A move-only handler diff --git a/test/beast/http/chunk_encode.cpp b/test/beast/http/chunk_encode.cpp index abd5c48d..ceedf636 100644 --- a/test/beast/http/chunk_encode.cpp +++ b/test/beast/http/chunk_encode.cpp @@ -30,10 +30,10 @@ class chunk_encode_test public: struct not_chunk_extensions {}; - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( detail::is_chunk_extensions::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! detail::is_chunk_extensions::value); template diff --git a/test/beast/http/empty_body.cpp b/test/beast/http/empty_body.cpp index 771eae00..5a6cb056 100644 --- a/test/beast/http/empty_body.cpp +++ b/test/beast/http/empty_body.cpp @@ -16,9 +16,9 @@ namespace boost { namespace beast { namespace http { -BOOST_STATIC_ASSERT(is_body::value); -BOOST_STATIC_ASSERT(is_body_writer::value); -BOOST_STATIC_ASSERT(is_body_reader::value); +BOOST_CORE_STATIC_ASSERT(is_body::value); +BOOST_CORE_STATIC_ASSERT(is_body_writer::value); +BOOST_CORE_STATIC_ASSERT(is_body_reader::value); } // http } // beast diff --git a/test/beast/http/fields.cpp b/test/beast/http/fields.cpp index be3e83f2..c1aa3bbe 100644 --- a/test/beast/http/fields.cpp +++ b/test/beast/http/fields.cpp @@ -28,12 +28,12 @@ public: static constexpr std::size_t max_static_buffer = sizeof(beast::detail::temporary_buffer); - BOOST_STATIC_ASSERT(is_fields::value); + BOOST_CORE_STATIC_ASSERT(is_fields::value); // std::allocator is noexcept movable, fields should satisfy // these constraints as well. - BOOST_STATIC_ASSERT(std::is_nothrow_move_constructible::value); - BOOST_STATIC_ASSERT(std::is_nothrow_move_assignable::value); + BOOST_CORE_STATIC_ASSERT(std::is_nothrow_move_constructible::value); + BOOST_CORE_STATIC_ASSERT(std::is_nothrow_move_assignable::value); template using fa_t = basic_fields; @@ -1039,33 +1039,33 @@ public: void testIssue2085() { - BOOST_STATIC_ASSERT((! set_test::value)); - BOOST_STATIC_ASSERT((! set_test::value)); - BOOST_STATIC_ASSERT((! set_test::value)); - BOOST_STATIC_ASSERT((! set_test::value)); - BOOST_STATIC_ASSERT((! set_test::value)); - BOOST_STATIC_ASSERT((! set_test::value)); + BOOST_CORE_STATIC_ASSERT((! set_test::value)); + BOOST_CORE_STATIC_ASSERT((! set_test::value)); + BOOST_CORE_STATIC_ASSERT((! set_test::value)); + BOOST_CORE_STATIC_ASSERT((! set_test::value)); + BOOST_CORE_STATIC_ASSERT((! set_test::value)); + BOOST_CORE_STATIC_ASSERT((! set_test::value)); - BOOST_STATIC_ASSERT(( set_test::value)); - BOOST_STATIC_ASSERT(( set_test::value)); - BOOST_STATIC_ASSERT(( set_test::value)); - BOOST_STATIC_ASSERT(( set_test::value)); - BOOST_STATIC_ASSERT(( set_test::value)); - BOOST_STATIC_ASSERT(( set_test::value)); + BOOST_CORE_STATIC_ASSERT(( set_test::value)); + BOOST_CORE_STATIC_ASSERT(( set_test::value)); + BOOST_CORE_STATIC_ASSERT(( set_test::value)); + BOOST_CORE_STATIC_ASSERT(( set_test::value)); + BOOST_CORE_STATIC_ASSERT(( set_test::value)); + BOOST_CORE_STATIC_ASSERT(( set_test::value)); - BOOST_STATIC_ASSERT((! insert_test::value)); - BOOST_STATIC_ASSERT((! insert_test::value)); - BOOST_STATIC_ASSERT((! insert_test::value)); - BOOST_STATIC_ASSERT((! insert_test::value)); - BOOST_STATIC_ASSERT((! insert_test::value)); - BOOST_STATIC_ASSERT((! insert_test::value)); + BOOST_CORE_STATIC_ASSERT((! insert_test::value)); + BOOST_CORE_STATIC_ASSERT((! insert_test::value)); + BOOST_CORE_STATIC_ASSERT((! insert_test::value)); + BOOST_CORE_STATIC_ASSERT((! insert_test::value)); + BOOST_CORE_STATIC_ASSERT((! insert_test::value)); + BOOST_CORE_STATIC_ASSERT((! insert_test::value)); - BOOST_STATIC_ASSERT(( insert_test::value)); - BOOST_STATIC_ASSERT(( insert_test::value)); - BOOST_STATIC_ASSERT(( insert_test::value)); - BOOST_STATIC_ASSERT(( insert_test::value)); - BOOST_STATIC_ASSERT(( insert_test::value)); - BOOST_STATIC_ASSERT(( insert_test::value)); + BOOST_CORE_STATIC_ASSERT(( insert_test::value)); + BOOST_CORE_STATIC_ASSERT(( insert_test::value)); + BOOST_CORE_STATIC_ASSERT(( insert_test::value)); + BOOST_CORE_STATIC_ASSERT(( insert_test::value)); + BOOST_CORE_STATIC_ASSERT(( insert_test::value)); + BOOST_CORE_STATIC_ASSERT(( insert_test::value)); } template @@ -1119,12 +1119,12 @@ public: testIssue2517() { using test_fields = basic_fields>; - BOOST_STATIC_ASSERT(is_fields::value); + BOOST_CORE_STATIC_ASSERT(is_fields::value); // Check if basic_fields respects throw-constructibility and // propagate_on_container_move_assignment of the allocator. - BOOST_STATIC_ASSERT(std::is_nothrow_move_constructible::value); - BOOST_STATIC_ASSERT(!std::is_nothrow_move_assignable::value); + BOOST_CORE_STATIC_ASSERT(std::is_nothrow_move_constructible::value); + BOOST_CORE_STATIC_ASSERT(!std::is_nothrow_move_assignable::value); test_fields f1; f1.insert("1", "1"); diff --git a/test/beast/http/message.cpp b/test/beast/http/message.cpp index b1062814..d24e1306 100644 --- a/test/beast/http/message.cpp +++ b/test/beast/http/message.cpp @@ -79,50 +79,50 @@ public: }; // 0-arg - BOOST_STATIC_ASSERT(std::is_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_constructible< request>::value); // 1-arg - BOOST_STATIC_ASSERT(! std::is_constructible + BOOST_CORE_STATIC_ASSERT(! std::is_constructible >::value); - //BOOST_STATIC_ASSERT(! std::is_constructible, + //BOOST_CORE_STATIC_ASSERT(! std::is_constructible, // verb, string_view, unsigned>::value); - BOOST_STATIC_ASSERT(std::is_constructible, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, verb, string_view, unsigned, Arg1>::value); - BOOST_STATIC_ASSERT(std::is_constructible, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, verb, string_view, unsigned, Arg1&&>::value); - BOOST_STATIC_ASSERT(std::is_constructible, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, verb, string_view, unsigned, Arg1 const>::value); - BOOST_STATIC_ASSERT(std::is_constructible, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, verb, string_view, unsigned, Arg1 const&>::value); // 1-arg + fields - BOOST_STATIC_ASSERT(std::is_constructible, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, verb, string_view, unsigned, Arg1, fields::allocator_type>::value); - BOOST_STATIC_ASSERT(std::is_constructible, std::piecewise_construct_t, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, std::piecewise_construct_t, std::tuple>::value); - BOOST_STATIC_ASSERT(std::is_constructible, std::piecewise_construct_t, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, std::piecewise_construct_t, std::tuple>::value); - BOOST_STATIC_ASSERT(std::is_constructible, std::piecewise_construct_t, + BOOST_CORE_STATIC_ASSERT(std::is_constructible, std::piecewise_construct_t, std::tuple, std::tuple>::value); // special members - BOOST_STATIC_ASSERT(std::is_copy_constructible>::value); - BOOST_STATIC_ASSERT(std::is_move_constructible>::value); - BOOST_STATIC_ASSERT(std::is_copy_assignable>::value); - BOOST_STATIC_ASSERT(std::is_move_assignable>::value); - BOOST_STATIC_ASSERT(std::is_copy_constructible>::value); - BOOST_STATIC_ASSERT(std::is_move_constructible>::value); - BOOST_STATIC_ASSERT(std::is_copy_assignable>::value); - BOOST_STATIC_ASSERT(std::is_move_assignable>::value); + BOOST_CORE_STATIC_ASSERT(std::is_copy_constructible>::value); + BOOST_CORE_STATIC_ASSERT(std::is_move_constructible>::value); + BOOST_CORE_STATIC_ASSERT(std::is_copy_assignable>::value); + BOOST_CORE_STATIC_ASSERT(std::is_move_assignable>::value); + BOOST_CORE_STATIC_ASSERT(std::is_copy_constructible>::value); + BOOST_CORE_STATIC_ASSERT(std::is_move_constructible>::value); + BOOST_CORE_STATIC_ASSERT(std::is_copy_assignable>::value); + BOOST_CORE_STATIC_ASSERT(std::is_move_assignable>::value); void testMessage() diff --git a/test/beast/http/message_generator.cpp b/test/beast/http/message_generator.cpp index 58dce335..7861053f 100644 --- a/test/beast/http/message_generator.cpp +++ b/test/beast/http/message_generator.cpp @@ -91,21 +91,21 @@ class message_generator_test : public beast::unit_test::suite static_assert( is_buffers_generator::value, "buffers_generator not modeled"); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_constructible< message_generator, message&&>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( std::is_constructible< message_generator, message&&>::value); // only rvalue refs - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! std::is_constructible< message_generator, message&>::value); - BOOST_STATIC_ASSERT( + BOOST_CORE_STATIC_ASSERT( ! std::is_constructible< message_generator, message const&>::value); diff --git a/test/beast/http/serializer.cpp b/test/beast/http/serializer.cpp index 4b14d63f..ee48f561 100644 --- a/test/beast/http/serializer.cpp +++ b/test/beast/http/serializer.cpp @@ -61,25 +61,25 @@ public: }; }; - BOOST_STATIC_ASSERT(std::is_const< serializer< + BOOST_CORE_STATIC_ASSERT(std::is_const< serializer< true, const_body>::value_type>::value); - BOOST_STATIC_ASSERT(! std::is_const::value_type>::value); - BOOST_STATIC_ASSERT(std::is_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_constructible< serializer, message &>::value); - BOOST_STATIC_ASSERT(std::is_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_constructible< serializer, message const&>::value); - BOOST_STATIC_ASSERT(std::is_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_constructible< serializer, message &>::value); - BOOST_STATIC_ASSERT(! std::is_constructible< + BOOST_CORE_STATIC_ASSERT(! std::is_constructible< serializer, message const&>::value); diff --git a/test/beast/http/string_body.cpp b/test/beast/http/string_body.cpp index 9b5e8aa6..4de22fd2 100644 --- a/test/beast/http/string_body.cpp +++ b/test/beast/http/string_body.cpp @@ -16,9 +16,9 @@ namespace boost { namespace beast { namespace http { -BOOST_STATIC_ASSERT(is_body::value); -BOOST_STATIC_ASSERT(is_body_writer::value); -BOOST_STATIC_ASSERT(is_body_reader::value); +BOOST_CORE_STATIC_ASSERT(is_body::value); +BOOST_CORE_STATIC_ASSERT(is_body_writer::value); +BOOST_CORE_STATIC_ASSERT(is_body_reader::value); } // http } // beast diff --git a/test/beast/http/type_traits.cpp b/test/beast/http/type_traits.cpp index e68d1b4b..472f69bb 100644 --- a/test/beast/http/type_traits.cpp +++ b/test/beast/http/type_traits.cpp @@ -24,97 +24,97 @@ namespace http { // Buffers -BOOST_STATIC_ASSERT(net::is_const_buffer_sequence::value); +BOOST_CORE_STATIC_ASSERT(net::is_const_buffer_sequence::value); -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< buffers_type, net::const_buffer>::value); -BOOST_STATIC_ASSERT(! std::is_same< +BOOST_CORE_STATIC_ASSERT(! std::is_same< buffers_type, net::mutable_buffer>::value); -BOOST_STATIC_ASSERT(std::is_convertible< +BOOST_CORE_STATIC_ASSERT(std::is_convertible< decltype(*net::buffer_sequence_begin(std::declval())), net::const_buffer >::value); -BOOST_STATIC_ASSERT(! std::is_convertible< +BOOST_CORE_STATIC_ASSERT(! std::is_convertible< decltype(*net::buffer_sequence_begin(std::declval())), net::mutable_buffer >::value); -BOOST_STATIC_ASSERT(net::is_const_buffer_sequence< +BOOST_CORE_STATIC_ASSERT(net::is_const_buffer_sequence< buffers_cat_view >::value); -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< buffers_type>, net::const_buffer>::value); -BOOST_STATIC_ASSERT(! std::is_same< +BOOST_CORE_STATIC_ASSERT(! std::is_same< buffers_type>, net::mutable_buffer>::value); using bs_t = buffers_suffix>; -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< buffers_type, net::const_buffer>::value); -BOOST_STATIC_ASSERT(! std::is_same< +BOOST_CORE_STATIC_ASSERT(! std::is_same< buffers_type, net::mutable_buffer>::value); -BOOST_STATIC_ASSERT(std::is_convertible< +BOOST_CORE_STATIC_ASSERT(std::is_convertible< decltype(*std::declval().begin()), net::const_buffer>::value); -BOOST_STATIC_ASSERT(! std::is_convertible< +BOOST_CORE_STATIC_ASSERT(! std::is_convertible< decltype(*std::declval().begin()), net::mutable_buffer>::value); -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< buffers_iterator_type, decltype(std::declval().begin())>::value); using iter_t = bs_t::const_iterator; -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< net::const_buffer, decltype(std::declval().operator*()) >::value); -BOOST_STATIC_ASSERT(! std::is_same< +BOOST_CORE_STATIC_ASSERT(! std::is_same< net::mutable_buffer, decltype(std::declval().operator*()) >::value); -BOOST_STATIC_ASSERT(std::is_constructible< +BOOST_CORE_STATIC_ASSERT(std::is_constructible< net::const_buffer, decltype(std::declval().operator*())>::value); -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< net::const_buffer, buffers_suffix< buffers_cat_view >::const_iterator::value_type>::value); -BOOST_STATIC_ASSERT(std::is_same< +BOOST_CORE_STATIC_ASSERT(std::is_same< net::const_buffer, buffers_type< std::decay>::type >>::value); -BOOST_STATIC_ASSERT(std::is_same >::const_iterator const&>().operator*())>::value); -BOOST_STATIC_ASSERT(std::is_same >::const_iterator const&>().operator*())>::value); -BOOST_STATIC_ASSERT(std::is_same::value); +BOOST_CORE_STATIC_ASSERT(! is_body_writer::value); -BOOST_STATIC_ASSERT(is_body_writer::value); +BOOST_CORE_STATIC_ASSERT(is_body_writer::value); -BOOST_STATIC_ASSERT(! is_body_reader::value); +BOOST_CORE_STATIC_ASSERT(! is_body_reader::value); namespace { @@ -150,7 +150,7 @@ struct not_fields {}; } // (anonymous) -BOOST_STATIC_ASSERT(! is_fields::value); +BOOST_CORE_STATIC_ASSERT(! is_fields::value); } // http } // beast diff --git a/test/beast/http/vector_body.cpp b/test/beast/http/vector_body.cpp index 14a57718..626f46a0 100644 --- a/test/beast/http/vector_body.cpp +++ b/test/beast/http/vector_body.cpp @@ -18,14 +18,14 @@ namespace boost { namespace beast { namespace http { -BOOST_STATIC_ASSERT(is_body>::value); -BOOST_STATIC_ASSERT(is_body_writer>::value); -BOOST_STATIC_ASSERT(is_body_reader>::value); +BOOST_CORE_STATIC_ASSERT(is_body>::value); +BOOST_CORE_STATIC_ASSERT(is_body_writer>::value); +BOOST_CORE_STATIC_ASSERT(is_body_reader>::value); #if __cpp_lib_byte >= 201603 -BOOST_STATIC_ASSERT(is_body>::value); -BOOST_STATIC_ASSERT(is_body_writer>::value); -BOOST_STATIC_ASSERT(is_body_reader>::value); +BOOST_CORE_STATIC_ASSERT(is_body>::value); +BOOST_CORE_STATIC_ASSERT(is_body_writer>::value); +BOOST_CORE_STATIC_ASSERT(is_body_reader>::value); #endif } // http diff --git a/test/beast/websocket/stream.cpp b/test/beast/websocket/stream.cpp index b9e1d8f0..d3c9dd8d 100644 --- a/test/beast/websocket/stream.cpp +++ b/test/beast/websocket/stream.cpp @@ -167,25 +167,25 @@ public: void run() override { - BOOST_STATIC_ASSERT(std::is_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_constructible< stream, net::io_context&>::value); - BOOST_STATIC_ASSERT(std::is_move_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_move_constructible< stream>::value); #if 0 - BOOST_STATIC_ASSERT(std::is_move_assignable< + BOOST_CORE_STATIC_ASSERT(std::is_move_assignable< stream>::value); #endif - BOOST_STATIC_ASSERT(std::is_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_constructible< stream, test::stream&>::value); // VFALCO Should these be allowed for NextLayer references? - BOOST_STATIC_ASSERT(std::is_move_constructible< + BOOST_CORE_STATIC_ASSERT(std::is_move_constructible< stream>::value); #if 0 - BOOST_STATIC_ASSERT(std::is_move_assignable< + BOOST_CORE_STATIC_ASSERT(std::is_move_assignable< stream>::value); #endif diff --git a/test/beast/websocket/stream_base.cpp b/test/beast/websocket/stream_base.cpp index e61a51ed..d9fe7e26 100644 --- a/test/beast/websocket/stream_base.cpp +++ b/test/beast/websocket/stream_base.cpp @@ -46,12 +46,12 @@ public: void operator()(); }; - BOOST_STATIC_ASSERT(detail::is_decorator::value); - BOOST_STATIC_ASSERT(detail::is_decorator::value); - BOOST_STATIC_ASSERT(detail::is_decorator::value); - BOOST_STATIC_ASSERT(detail::is_decorator::value); - BOOST_STATIC_ASSERT(! detail::is_decorator::value); - BOOST_STATIC_ASSERT(! detail::is_decorator::value); + BOOST_CORE_STATIC_ASSERT(detail::is_decorator::value); + BOOST_CORE_STATIC_ASSERT(detail::is_decorator::value); + BOOST_CORE_STATIC_ASSERT(detail::is_decorator::value); + BOOST_CORE_STATIC_ASSERT(detail::is_decorator::value); + BOOST_CORE_STATIC_ASSERT(! detail::is_decorator::value); + BOOST_CORE_STATIC_ASSERT(! detail::is_decorator::value); void testJavadoc() diff --git a/test/cmake_test/CMakeLists.txt b/test/cmake_test/CMakeLists.txt index 847e52e7..d4860b38 100644 --- a/test/cmake_test/CMakeLists.txt +++ b/test/cmake_test/CMakeLists.txt @@ -38,7 +38,6 @@ else() optional preprocessor smart_ptr - static_assert static_string system throw_exception @@ -53,6 +52,7 @@ else() date_time move describe + static_assert utility variant2 predef @@ -75,8 +75,8 @@ else() conversion integer detail - function_types fusion + function_types functional typeof ) diff --git a/test/doc/core_1_refresher.cpp b/test/doc/core_1_refresher.cpp index c888e643..25362d87 100644 --- a/test/doc/core_1_refresher.cpp +++ b/test/doc/core_1_refresher.cpp @@ -202,8 +202,8 @@ std::size_t sync_write_stream::write_some(ConstBufferSequence const&, error_code { return 0; } -BOOST_STATIC_ASSERT(is_sync_read_stream::value); -BOOST_STATIC_ASSERT(is_sync_write_stream::value); +BOOST_CORE_STATIC_ASSERT(is_sync_read_stream::value); +BOOST_CORE_STATIC_ASSERT(is_sync_write_stream::value); //------------------------------------------------------------------------------ diff --git a/test/doc/core_4_layers.cpp b/test/doc/core_4_layers.cpp index 3e72c073..4ec6160e 100644 --- a/test/doc/core_4_layers.cpp +++ b/test/doc/core_4_layers.cpp @@ -287,10 +287,10 @@ public: template class counted_stream; -BOOST_STATIC_ASSERT(is_sync_read_stream>::value); -BOOST_STATIC_ASSERT(is_sync_write_stream>::value); -BOOST_STATIC_ASSERT(is_async_read_stream>::value); -BOOST_STATIC_ASSERT(is_async_write_stream>::value); +BOOST_CORE_STATIC_ASSERT(is_sync_read_stream>::value); +BOOST_CORE_STATIC_ASSERT(is_sync_write_stream>::value); +BOOST_CORE_STATIC_ASSERT(is_async_read_stream>::value); +BOOST_CORE_STATIC_ASSERT(is_async_write_stream>::value); struct core_4_layers_test : public beast::unit_test::suite