Add ref-qualified overloads for message::body

This commit is contained in:
Vinnie Falco
2017-10-30 15:23:43 -07:00
parent e39e4c73bf
commit 23bf8638ab
5 changed files with 55 additions and 3 deletions
+29
View File
@@ -273,6 +273,34 @@ public:
}
}
void
testBody()
{
{
auto f = [](empty_body::value_type&){};
request<empty_body> m;
f(m.body());
}
{
auto f = [](empty_body::value_type const&){};
request<empty_body> const m;
f(m.body());
f(std::move(m.body()));
}
{
auto f = [](empty_body::value_type&&){};
request<empty_body> m;
f(std::move(m).body());
f(std::move(m.body()));
}
{
auto f = [](empty_body::value_type const&&){};
request<empty_body> const m;
f(std::move(m).body());
f(std::move(m.body()));
}
}
void
testSwap()
{
@@ -477,6 +505,7 @@ public:
{
testMessage();
testMessageCtors();
testBody();
testSwap();
testSpecialMembers();
testMethod();