mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Remove foa-related macro used for relaxing invariant checking in check_equivalent_keys
This commit is contained in:
@ -54,20 +54,10 @@ namespace test {
|
|||||||
if (test::has_unique_keys<X>::value && count != 1)
|
if (test::has_unique_keys<X>::value && count != 1)
|
||||||
BOOST_ERROR("Non-unique key.");
|
BOOST_ERROR("Non-unique key.");
|
||||||
|
|
||||||
#if !defined(BOOST_UNORDERED_FOA_WEAK_GUARANTEE_SWAP_EXCEPTIONS_TESTS)
|
|
||||||
// we conditionally compile this check because our FOA implementation only
|
|
||||||
// exhibits the weak guarantee when swapping throws
|
|
||||||
//
|
|
||||||
// in this case, the hasher may be changed before the predicate and the
|
|
||||||
// arrays are swapped in which case, we can can find an element by
|
|
||||||
// iteration but unfortunately, it's in the wrong slot according to the
|
|
||||||
// new hash function so count(key) can wind up returning nothing when
|
|
||||||
// there really is something
|
|
||||||
if (x1.count(key) != count) {
|
if (x1.count(key) != count) {
|
||||||
BOOST_ERROR("Incorrect output of count.");
|
BOOST_ERROR("Incorrect output of count.");
|
||||||
std::cerr << x1.count(key) << "," << count << "\n";
|
std::cerr << x1.count(key) << "," << count << "\n";
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BOOST_UNORDERED_FOA_TESTS
|
#ifndef BOOST_UNORDERED_FOA_TESTS
|
||||||
// Check that the keys are in the correct bucket and are
|
// Check that the keys are in the correct bucket and are
|
||||||
|
Reference in New Issue
Block a user