diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e09a6ff..0e674db3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 153: + +* Remove BOOST_VERSION checks + +-------------------------------------------------------------------------------- + Version 152: * Refactor detect_ssl_op diff --git a/include/boost/beast/core/buffers_prefix.hpp b/include/boost/beast/core/buffers_prefix.hpp index 67d58b5c..858723fe 100644 --- a/include/boost/beast/core/buffers_prefix.hpp +++ b/include/boost/beast/core/buffers_prefix.hpp @@ -12,8 +12,8 @@ #include #include -#include #include +#include #include #include diff --git a/include/boost/beast/core/buffers_suffix.hpp b/include/boost/beast/core/buffers_suffix.hpp index 81eb5a6b..39596945 100644 --- a/include/boost/beast/core/buffers_suffix.hpp +++ b/include/boost/beast/core/buffers_suffix.hpp @@ -11,7 +11,6 @@ #define BOOST_BEAST_BUFFERS_SUFFIX_HPP #include -#include #include #include #include diff --git a/include/boost/beast/core/detail/config.hpp b/include/boost/beast/core/detail/config.hpp index 69be5d19..68e3dda8 100644 --- a/include/boost/beast/core/detail/config.hpp +++ b/include/boost/beast/core/detail/config.hpp @@ -48,12 +48,6 @@ #endif -#if BOOST_VERSION >= 106500 || ! defined(BOOST_GCC) || BOOST_GCC < 70000 -# define BOOST_BEAST_FALLTHROUGH BOOST_FALLTHROUGH -#else -# define BOOST_BEAST_FALLTHROUGH __attribute__((fallthrough)) -#endif - #define BOOST_BEAST_DEPRECATION_STRING \ "This is a deprecated interface, #define BOOST_BEAST_ALLOW_DEPRECATED to allow it" diff --git a/include/boost/beast/core/detail/in_place_init.hpp b/include/boost/beast/core/detail/in_place_init.hpp deleted file mode 100644 index d3a33bec..00000000 --- a/include/boost/beast/core/detail/in_place_init.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// Official repository: https://github.com/boostorg/beast -// - -#ifndef BOOST_BEAST_DETAIL_IN_PLACE_INIT_HPP -#define BOOST_BEAST_DETAIL_IN_PLACE_INIT_HPP - -#include -#include - -// Provide boost::in_place_init_t and boost::in_place_init -// for Boost versions earlier than 1.63.0. - -#if BOOST_VERSION < 106300 - -namespace boost { - -namespace optional_ns { - -// a tag for in-place initialization of contained value -struct in_place_init_t -{ - struct init_tag{}; - explicit in_place_init_t(init_tag){} -}; -const in_place_init_t in_place_init ((in_place_init_t::init_tag())); - -} // namespace optional_ns - -using optional_ns::in_place_init_t; -using optional_ns::in_place_init; - -} - -#endif - -#endif - diff --git a/include/boost/beast/core/impl/buffered_read_stream.ipp b/include/boost/beast/core/impl/buffered_read_stream.ipp index 3e6b935f..139c66a7 100644 --- a/include/boost/beast/core/impl/buffered_read_stream.ipp +++ b/include/boost/beast/core/impl/buffered_read_stream.ipp @@ -121,7 +121,7 @@ read_some_op::operator()( case 2: s_.buffer_.commit(bytes_transferred); - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case 3: bytes_transferred = diff --git a/include/boost/beast/http/impl/basic_parser.ipp b/include/boost/beast/http/impl/basic_parser.ipp index 355a76fb..39ad3cc6 100644 --- a/include/boost/beast/http/impl/basic_parser.ipp +++ b/include/boost/beast/http/impl/basic_parser.ipp @@ -148,7 +148,7 @@ loop: return 0; } state_ = state::start_line; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case state::start_line: { @@ -179,7 +179,7 @@ loop: ec = error::need_more; goto done; } - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case state::fields: @@ -212,7 +212,7 @@ loop: if(ec) goto done; state_ = state::body; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case state::body: BOOST_ASSERT(! skip_); @@ -227,7 +227,7 @@ loop: if(ec) goto done; state_ = state::body_to_eof; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case state::body_to_eof: BOOST_ASSERT(! skip_); @@ -241,7 +241,7 @@ loop: if(ec) goto done; state_ = state::chunk_header; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case state::chunk_header: parse_chunk_header(p, n, ec); diff --git a/include/boost/beast/http/impl/serializer.ipp b/include/boost/beast/http/impl/serializer.ipp index 6b1a2dd9..57b53a78 100644 --- a/include/boost/beast/http/impl/serializer.ipp +++ b/include/boost/beast/http/impl/serializer.ipp @@ -102,7 +102,7 @@ next(error_code& ec, Visit&& visit) if(m_.chunked()) goto go_init_c; s_ = do_init; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case do_init: @@ -125,7 +125,7 @@ next(error_code& ec, Visit&& visit) fwr_->get(), result->first); s_ = do_header; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case do_header: @@ -135,14 +135,14 @@ next(error_code& ec, Visit&& visit) go_header_only: v_.template emplace<1>(fwr_->get()); s_ = do_header_only; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_header_only: do_visit<1>(ec, visit); break; case do_body: s_ = do_body + 1; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_body + 1: { @@ -154,7 +154,7 @@ next(error_code& ec, Visit&& visit) more_ = result->second; v_.template emplace<3>(result->first); s_ = do_body + 2; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case do_body + 2: @@ -165,7 +165,7 @@ next(error_code& ec, Visit&& visit) go_init_c: s_ = do_init_c; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_init_c: { wr_.init(ec); @@ -206,7 +206,7 @@ next(error_code& ec, Visit&& visit) result->first, chunk_crlf{}); s_ = do_header_c; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case do_header_c: @@ -222,7 +222,7 @@ next(error_code& ec, Visit&& visit) case do_body_c: s_ = do_body_c + 1; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_body_c + 1: { @@ -255,7 +255,7 @@ next(error_code& ec, Visit&& visit) result->first, chunk_crlf{}); s_ = do_body_c + 2; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case do_body_c + 2: @@ -264,14 +264,14 @@ next(error_code& ec, Visit&& visit) go_body_final_c: s_ = do_body_final_c; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_body_final_c: do_visit<6>(ec, visit); break; go_all_c: s_ = do_all_c; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_all_c: do_visit<7>(ec, visit); break; @@ -284,7 +284,7 @@ next(error_code& ec, Visit&& visit) boost::asio::const_buffer{nullptr, 0}, chunk_crlf{}); s_ = do_final_c + 1; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case do_final_c + 1: do_visit<8>(ec, visit); diff --git a/include/boost/beast/http/impl/status.ipp b/include/boost/beast/http/impl/status.ipp index 1cc8f34b..7d379194 100644 --- a/include/boost/beast/http/impl/status.ipp +++ b/include/boost/beast/http/impl/status.ipp @@ -28,7 +28,7 @@ int_to_status(unsigned v) case status::continue_: case status::switching_protocols: case status::processing: - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; // 2xx case status::ok: @@ -41,7 +41,7 @@ int_to_status(unsigned v) case status::multi_status: case status::already_reported: case status::im_used: - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; // 3xx case status::multiple_choices: @@ -52,7 +52,7 @@ int_to_status(unsigned v) case status::use_proxy: case status::temporary_redirect: case status::permanent_redirect: - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; // 4xx case status::bad_request: @@ -84,7 +84,7 @@ int_to_status(unsigned v) case status::connection_closed_without_response: case status::unavailable_for_legal_reasons: case status::client_closed_request: - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; // 5xx case status::internal_server_error: diff --git a/include/boost/beast/http/impl/verb.ipp b/include/boost/beast/http/impl/verb.ipp index 82060916..bfd703d0 100644 --- a/include/boost/beast/http/impl/verb.ipp +++ b/include/boost/beast/http/impl/verb.ipp @@ -159,7 +159,7 @@ string_to_verb(string_view v) return verb::connect; if(eq(v, "PY")) return verb::copy; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; default: break; @@ -220,7 +220,7 @@ string_to_verb(string_view v) case 'O': if(eq(v, "VE")) return verb::move; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; default: break; @@ -264,7 +264,7 @@ string_to_verb(string_view v) return verb::purge; if(eq(v, "T")) return verb::put; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; default: break; diff --git a/include/boost/beast/http/impl/write.ipp b/include/boost/beast/http/impl/write.ipp index 8fd82a5e..10cd26ef 100644 --- a/include/boost/beast/http/impl/write.ipp +++ b/include/boost/beast/http/impl/write.ipp @@ -280,7 +280,7 @@ operator()( case 2: state_ = 3; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case 3: { diff --git a/include/boost/beast/websocket/detail/mask.hpp b/include/boost/beast/websocket/detail/mask.hpp index 92ea0a42..e071fbc7 100644 --- a/include/boost/beast/websocket/detail/mask.hpp +++ b/include/boost/beast/websocket/detail/mask.hpp @@ -132,15 +132,15 @@ mask_inplace_fast( std::uintptr_t>(p) & (sizeof(key)-1); switch(i) { - case 1: p[2] ^= static_cast(key >> 16); BOOST_BEAST_FALLTHROUGH; - case 2: p[1] ^= static_cast(key >> 8); BOOST_BEAST_FALLTHROUGH; + case 1: p[2] ^= static_cast(key >> 16); BOOST_FALLTHROUGH; + case 2: p[1] ^= static_cast(key >> 8); BOOST_FALLTHROUGH; case 3: p[0] ^= static_cast(key); { auto const d = static_cast(sizeof(key) - i); key = ror(key, 8*d); n -= d; p += d; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } default: break; @@ -159,11 +159,11 @@ mask_inplace_fast( n &= sizeof(key)-1; switch(n) { - case 3: p[2] ^= static_cast(key >> 16); BOOST_BEAST_FALLTHROUGH; - case 2: p[1] ^= static_cast(key >> 8); BOOST_BEAST_FALLTHROUGH; + case 3: p[2] ^= static_cast(key >> 16); BOOST_FALLTHROUGH; + case 2: p[1] ^= static_cast(key >> 8); BOOST_FALLTHROUGH; case 1: p[0] ^= static_cast(key); key = ror(key, static_cast(8*n)); - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; default: break; } diff --git a/include/boost/beast/websocket/detail/utf8_checker.hpp b/include/boost/beast/websocket/detail/utf8_checker.hpp index e86310f0..61c241bc 100644 --- a/include/boost/beast/websocket/detail/utf8_checker.hpp +++ b/include/boost/beast/websocket/detail/utf8_checker.hpp @@ -151,13 +151,13 @@ write(std::uint8_t const* in, std::size_t size) { default: BOOST_ASSERT(false); - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case 1: cp_[1] = 0x81; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case 2: cp_[2] = 0x81; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case 3: cp_[3] = 0x81; break; diff --git a/include/boost/beast/zlib/detail/inflate_stream.hpp b/include/boost/beast/zlib/detail/inflate_stream.hpp index 57be1723..4b40ae11 100644 --- a/include/boost/beast/zlib/detail/inflate_stream.hpp +++ b/include/boost/beast/zlib/detail/inflate_stream.hpp @@ -380,12 +380,12 @@ doWrite(z_params& zs, Flush flush, error_code& ec) mode_ = COPY_; if(flush == Flush::trees) return done(); - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case COPY_: mode_ = COPY; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case COPY: { @@ -419,7 +419,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) return err(error::too_many_symbols); have_ = 0; mode_ = LENLENS; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case LENLENS: { @@ -447,7 +447,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) } have_ = 0; mode_ = CODELENS; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case CODELENS: @@ -536,12 +536,12 @@ doWrite(z_params& zs, Flush flush, error_code& ec) mode_ = LEN_; if(flush == Flush::trees) return done(); - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case LEN_: mode_ = LEN; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case LEN: { @@ -594,7 +594,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) return err(error::invalid_literal_length); extra_ = cp->op & 15; mode_ = LENEXT; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case LENEXT: @@ -609,7 +609,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) } was_ = length_; mode_ = DIST; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case DIST: { @@ -638,7 +638,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) offset_ = cp->val; extra_ = cp->op & 15; mode_ = DISTEXT; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; } case DISTEXT: @@ -656,7 +656,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) return err(error::invalid_distance); #endif mode_ = MATCH; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case MATCH: { @@ -701,7 +701,7 @@ doWrite(z_params& zs, Flush flush, error_code& ec) case CHECK: mode_ = DONE; - BOOST_BEAST_FALLTHROUGH; + BOOST_FALLTHROUGH; case DONE: ec = error::end_of_stream;