forked from boostorg/beast
Add ref-qualified overloads for message::body
This commit is contained in:
@@ -849,7 +849,7 @@ struct message
|
||||
#else
|
||||
detail::value_type_t<Body>&
|
||||
#endif
|
||||
body() noexcept
|
||||
body()& noexcept
|
||||
{
|
||||
return this->member();
|
||||
}
|
||||
@@ -860,11 +860,33 @@ struct message
|
||||
#else
|
||||
detail::value_type_t<Body> const&
|
||||
#endif
|
||||
body() const noexcept
|
||||
body() const& noexcept
|
||||
{
|
||||
return this->member();
|
||||
}
|
||||
|
||||
/// Returns the body
|
||||
#if BOOST_BEAST_DOXYGEN || ! defined(BOOST_MSVC)
|
||||
typename body_type::value_type&&
|
||||
#else
|
||||
detail::value_type_t<Body>&&
|
||||
#endif
|
||||
body()&& noexcept
|
||||
{
|
||||
return std::move(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 std::move(this->member());
|
||||
}
|
||||
|
||||
private:
|
||||
static_assert(is_body<Body>::value,
|
||||
"Body requirements not met");
|
||||
|
||||
Reference in New Issue
Block a user