From 5177d729a7f872a47b173edc1e7e4e7a849dd81a Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 31 Oct 2017 14:43:10 -0700 Subject: [PATCH] Remove const&& overload of message::body --- CHANGELOG.md | 6 ++++++ include/boost/beast/http/message.hpp | 19 ++++--------------- test/beast/http/message.cpp | 5 ++--- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9a848a4..b874ddbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 133: + +* Remove const&& overload of message::body + +-------------------------------------------------------------------------------- + Version 132: * Tidy up project folders in CMakeLists.txt diff --git a/include/boost/beast/http/message.hpp b/include/boost/beast/http/message.hpp index b6912f35..5e7e8b77 100644 --- a/include/boost/beast/http/message.hpp +++ b/include/boost/beast/http/message.hpp @@ -854,17 +854,6 @@ struct message return this->member(); } - /// Returns the body -#if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC) - typename body_type::value_type const& -#else - detail::value_type_t const& -#endif - body() const& noexcept - { - return this->member(); - } - /// Returns the body #if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC) typename body_type::value_type&& @@ -878,13 +867,13 @@ struct message /// Returns the body #if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC) - typename body_type::value_type const&& + typename body_type::value_type const& #else - detail::value_type_t const&& + detail::value_type_t const& #endif - body() const&& noexcept + body() const& noexcept { - return std::move(this->member()); + return this->member(); } private: diff --git a/test/beast/http/message.cpp b/test/beast/http/message.cpp index 39b702ac..292024c8 100644 --- a/test/beast/http/message.cpp +++ b/test/beast/http/message.cpp @@ -283,7 +283,7 @@ public: } { auto f = [](empty_body::value_type const&){}; - request const m; + request const m{}; f(m.body()); f(std::move(m.body())); } @@ -295,8 +295,7 @@ public: } { auto f = [](empty_body::value_type const&&){}; - request const m; - f(std::move(m).body()); + request const m{}; f(std::move(m.body())); } }