Enable user warnings in tests to be able to fix them.

This commit is contained in:
Ion Gaztañaga
2020-07-12 11:06:01 +02:00
parent 5d8e008c50
commit 4f37a023b0
14 changed files with 12 additions and 49 deletions

View File

@@ -340,24 +340,24 @@ int main()
typedef boost::container::vector<int> cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
if (boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value) {
std::cerr << "has_trivial_destructor_after_move(default allocator) test failed" << std::endl;
return 1;
}
BOOST_STATIC_ASSERT_MSG
( !boost::has_trivial_destructor_after_move<pointer>::value ||
(boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<allocator_type>::value)
, "has_trivial_destructor_after_move(default allocator) test failed"
);
}
// std::allocator
{
typedef boost::container::vector<int, std::allocator<int> > cont;
typedef cont::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
if (boost::has_trivial_destructor_after_move<cont>::value !=
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value) {
std::cerr << "has_trivial_destructor_after_move(std::allocator) test failed" << std::endl;
return 1;
}
BOOST_STATIC_ASSERT_MSG
( !boost::has_trivial_destructor_after_move<pointer>::value ||
(boost::has_trivial_destructor_after_move<cont>::value ==
boost::has_trivial_destructor_after_move<allocator_type>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed"
);
}
return 0;