Remove const&& overload of message::body

This commit is contained in:
Vinnie Falco
2017-10-31 14:43:10 -07:00
parent e89814ff4a
commit 5177d729a7
3 changed files with 12 additions and 18 deletions

View File

@@ -1,3 +1,9 @@
Version 133:
* Remove const&& overload of message::body
--------------------------------------------------------------------------------
Version 132: Version 132:
* Tidy up project folders in CMakeLists.txt * Tidy up project folders in CMakeLists.txt

View File

@@ -854,17 +854,6 @@ struct message
return this->member(); return this->member();
} }
/// Returns the body
#if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC)
typename body_type::value_type const&
#else
detail::value_type_t<Body> const&
#endif
body() const& noexcept
{
return this->member();
}
/// Returns the body /// Returns the body
#if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC) #if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC)
typename body_type::value_type&& typename body_type::value_type&&
@@ -878,13 +867,13 @@ struct message
/// Returns the body /// Returns the body
#if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC) #if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC)
typename body_type::value_type const&& typename body_type::value_type const&
#else #else
detail::value_type_t<Body> const&& detail::value_type_t<Body> const&
#endif #endif
body() const&& noexcept body() const& noexcept
{ {
return std::move(this->member()); return this->member();
} }
private: private:

View File

@@ -283,7 +283,7 @@ public:
} }
{ {
auto f = [](empty_body::value_type const&){}; auto f = [](empty_body::value_type const&){};
request<empty_body> const m; request<empty_body> const m{};
f(m.body()); f(m.body());
f(std::move(m.body())); f(std::move(m.body()));
} }
@@ -295,8 +295,7 @@ public:
} }
{ {
auto f = [](empty_body::value_type const&&){}; auto f = [](empty_body::value_type const&&){};
request<empty_body> const m; request<empty_body> const m{};
f(std::move(m).body());
f(std::move(m.body())); f(std::move(m.body()));
} }
} }