Use BOOST_STATIC_ASSERT_MSG for constant checks

This commit is contained in:
Ion Gaztañaga
2022-01-04 00:36:36 +01:00
parent 576e15d6f6
commit 53a020f1f1
2 changed files with 12 additions and 20 deletions
+5 -10
View File
@@ -92,13 +92,10 @@ int main ()
typedef tree::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
typedef tree::key_compare key_compare;
if (boost::has_trivial_destructor_after_move<tree>::value !=
BOOST_STATIC_ASSERT_MSG((boost::has_trivial_destructor_after_move<tree>::value ==
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value &&
boost::has_trivial_destructor_after_move<key_compare>::value) {
std::cerr << "has_trivial_destructor_after_move(default allocator) test failed" << std::endl;
return 1;
}
boost::has_trivial_destructor_after_move<key_compare>::value), "has_trivial_destructor_after_move(default allocator) test failed");
}
// std::allocator
{
@@ -106,13 +103,11 @@ int main ()
typedef tree::allocator_type allocator_type;
typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
typedef tree::key_compare key_compare;
if (boost::has_trivial_destructor_after_move<tree>::value !=
BOOST_STATIC_ASSERT_MSG ((boost::has_trivial_destructor_after_move<tree>::value ==
boost::has_trivial_destructor_after_move<allocator_type>::value &&
boost::has_trivial_destructor_after_move<pointer>::value &&
boost::has_trivial_destructor_after_move<key_compare>::value) {
std::cerr << "has_trivial_destructor_after_move(std::allocator) test failed" << std::endl;
return 1;
}
boost::has_trivial_destructor_after_move<key_compare>::value)
, "has_trivial_destructor_after_move(std::allocator) test failed");
}
return 0;