diff --git a/CHANGELOG.md b/CHANGELOG.md index a6694f4f..1e7a312f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Version 75: * Use file_body for valid requests, string_body otherwise. * Construct buffer_prefix_view in-place +* Shrink serializer buffers using buffers_ref +* Tidy up BEAST_NO_BIG_VARIANTS -------------------------------------------------------------------------------- diff --git a/include/beast/http/impl/serializer.ipp b/include/beast/http/impl/serializer.ipp index 2f492cd3..d6984cfa 100644 --- a/include/beast/http/impl/serializer.ipp +++ b/include/beast/http/impl/serializer.ipp @@ -146,7 +146,7 @@ next(error_code& ec, Visit&& visit) if(! result) goto go_header_only_c; more_ = result->second; - #if ! BEAST_NO_BIG_VARIANTS + #ifndef BEAST_NO_BIG_VARIANTS if(! more_) { // do it all in one buffer @@ -226,7 +226,7 @@ next(error_code& ec, Visit&& visit) if(! result) goto go_final_c; more_ = result->second; - #if ! BEAST_NO_BIG_VARIANTS + #ifndef BEAST_NO_BIG_VARIANTS if(! more_) { // do it all in one buffer @@ -279,7 +279,7 @@ next(error_code& ec, Visit&& visit) visit(ec, boost::get(v_)); break; -#if ! BEAST_NO_BIG_VARIANTS +#ifndef BEAST_NO_BIG_VARIANTS go_body_final_c: s_ = do_body_final_c; case do_body_final_c: @@ -423,7 +423,7 @@ consume(std::size_t n) s_ = do_final_c; break; -#if ! BEAST_NO_BIG_VARIANTS +#ifndef BEAST_NO_BIG_VARIANTS case do_body_final_c: { auto& b = boost::get(v_); diff --git a/include/beast/http/serializer.hpp b/include/beast/http/serializer.hpp index 7069d31e..0ba8f431 100644 --- a/include/beast/http/serializer.hpp +++ b/include/beast/http/serializer.hpp @@ -21,9 +21,7 @@ #ifndef BEAST_NO_BIG_VARIANTS # if defined(BOOST_GCC) && BOOST_GCC < 50000 && BOOST_VERSION < 106400 -# define BEAST_NO_BIG_VARIANTS 1 -# else -# define BEAST_NO_BIG_VARIANTS 0 +# define BEAST_NO_BIG_VARIANTS # endif #endif @@ -148,7 +146,7 @@ class serializer do_header_c = 70, do_body_c = 80, do_final_c = 90, - #if ! BEAST_NO_BIG_VARIANTS + #ifndef BEAST_NO_BIG_VARIANTS do_body_final_c = 100, do_all_c = 110, #endif @@ -186,7 +184,7 @@ class serializer typename reader::const_buffers_type, // body boost::asio::const_buffers_1>>; // crlf -#if ! BEAST_NO_BIG_VARIANTS +#ifndef BEAST_NO_BIG_VARIANTS using ch2_t = consuming_buffers rd_; boost::variant v_;