Remove BOOST_NO_CXX11_RVALUE_REFERENCES workarounds

This commit is contained in:
Peter Dimov
2024-01-27 07:21:54 +02:00
parent c9357b6819
commit a9a0f90bc2
3 changed files with 1 additions and 22 deletions

View File

@@ -59,10 +59,8 @@ struct sum_struct {
}
};
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
int three(std::string&&) { return 1; }
std::string&& four(std::string&& s) { return boost::move(s); }
#endif
int main()
{
@@ -95,13 +93,11 @@ int main()
BOOST_CHECK(om2_sum_2.get_value() == 3);
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
function <int(std::string&&)> f3 = three;
function <std::string&& (std::string&& s)> f4 = four;
f3(std::string("Hello"));
BOOST_CHECK(f4(std::string("world")) == "world");
#endif
return boost::report_errors();
}