Update test Hash, KeyEqual to be nothrow swappable

This commit is contained in:
Christian Mazakas
2022-12-13 13:53:29 -08:00
parent b1d43d3ca5
commit 75ea43823e
2 changed files with 35 additions and 0 deletions
+10
View File
@@ -206,6 +206,11 @@ namespace test {
hash& operator=(hash const&) { return *this; }
~hash() {}
#if defined(BOOST_UNORDERED_FOA_TESTS)
hash(hash&&) = default;
hash& operator=(hash&&) = default;
#endif
std::size_t operator()(T const&) const { return 0; }
#if BOOST_UNORDERED_CHECK_ADDR_OPERATOR_NOT_USED
ampersand_operator_used operator&() const
@@ -224,6 +229,11 @@ namespace test {
equal_to& operator=(equal_to const&) { return *this; }
~equal_to() {}
#if defined(BOOST_UNORDERED_FOA_TESTS)
equal_to(equal_to&&) = default;
equal_to& operator=(equal_to&&) = default;
#endif
bool operator()(T const&, T const&) const { return true; }
#if BOOST_UNORDERED_CHECK_ADDR_OPERATOR_NOT_USED
ampersand_operator_used operator&() const