Remove const&& overload of message::body

This commit is contained in:
Vinnie Falco committed 2017-10-31 14:43:10 -07:00
1 parent e89814ff4a
commit 5177d729a7
3 files changed
+12 -18

No files matched your search

+6
View File
@@ -1,3 +1,9 @@
Version 133:
* Remove const&& overload of message::body
--------------------------------------------------------------------------------
Version 132:
* Tidy up project folders in CMakeLists.txt
+4 -15
View File
@@ -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<Body> 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<Body> const&&
detail::value_type_t<Body> const&
#endif
body() const&& noexcept
body() const& noexcept
{
return std::move(this->member());
return this->member();
}
private:
+2 -3
View File
@@ -283,7 +283,7 @@ public:
}
{
auto f = [](empty_body::value_type const&){};
request<empty_body> const m;
request<empty_body> const m{};
f(m.body());
f(std::move(m.body()));
}
@@ -295,8 +295,7 @@ public:
}
{
auto f = [](empty_body::value_type const&&){};
request<empty_body> const m;
f(std::move(m).body());
request<empty_body> const m{};
f(std::move(m.body()));
}
}