forked from boostorg/unordered
Avoid warnings in tests
This commit is contained in:
@ -265,7 +265,7 @@ void test_multiset()
|
||||
test_set_non_transparent_contains<non_transparent_multiset3>();
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST (contains) {
|
||||
UNORDERED_AUTO_TEST (contains_) { // avoid -Wshadow warning with `bool contains`
|
||||
test_map();
|
||||
test_multimap();
|
||||
test_set();
|
||||
|
@ -1108,7 +1108,7 @@ template <class UnorderedMap> void test_map_transparent_erase()
|
||||
|
||||
UnorderedMap map;
|
||||
|
||||
unsigned long num_erased = 0;
|
||||
std::size_t num_erased = 0;
|
||||
|
||||
num_erased = map.erase(0);
|
||||
BOOST_TEST(map.empty());
|
||||
@ -1150,7 +1150,7 @@ template <class UnorderedMap> void test_map_non_transparent_erase()
|
||||
|
||||
UnorderedMap map;
|
||||
|
||||
unsigned long num_erased = 0;
|
||||
std::size_t num_erased = 0;
|
||||
|
||||
num_erased = map.erase(0);
|
||||
BOOST_TEST(map.empty());
|
||||
@ -1248,7 +1248,7 @@ template <class UnorderedSet> void test_set_transparent_erase()
|
||||
|
||||
UnorderedSet set;
|
||||
|
||||
unsigned long num_erased = 0;
|
||||
std::size_t num_erased = 0;
|
||||
|
||||
num_erased = set.erase(0);
|
||||
BOOST_TEST(set.empty());
|
||||
@ -1290,7 +1290,7 @@ template <class UnorderedSet> void test_set_non_transparent_erase()
|
||||
|
||||
UnorderedSet set;
|
||||
|
||||
unsigned long num_erased = 0;
|
||||
std::size_t num_erased = 0;
|
||||
|
||||
num_erased = set.erase(0);
|
||||
BOOST_TEST(set.empty());
|
||||
|
@ -552,8 +552,8 @@ namespace unnecessary_copy_tests {
|
||||
|
||||
std::pair<count_copies const, count_copies> move_source_trial;
|
||||
reset();
|
||||
std::make_tuple(std::move(move_source_trial.first));
|
||||
std::make_tuple(std::move(move_source_trial.second));
|
||||
(void)std::make_tuple(std::move(move_source_trial.first));
|
||||
(void)std::make_tuple(std::move(move_source_trial.second));
|
||||
int tuple_move_cost = ::unnecessary_copy_tests::count_copies::moves;
|
||||
int tuple_copy_cost = ::unnecessary_copy_tests::count_copies::copies;
|
||||
|
||||
|
Reference in New Issue
Block a user