mirror of
https://github.com/boostorg/container.git
synced 2026-01-29 09:50:22 +01:00
Avoid including <boost/container/detail/config_begin.hpp> in tests to catch all possible warnings.
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
@@ -864,70 +862,55 @@ int main()
|
||||
{
|
||||
typedef boost::container::flat_set<int> cont;
|
||||
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, void> tree;
|
||||
if (boost::has_trivial_destructor_after_move<cont>::value !=
|
||||
boost::has_trivial_destructor_after_move<tree>::value) {
|
||||
std::cerr << "has_trivial_destructor_after_move(flat_set, default) test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
|
||||
boost::has_trivial_destructor_after_move<tree>::value
|
||||
, "has_trivial_destructor_after_move(flat_set, default) test failed");
|
||||
}
|
||||
// flat_set, vector
|
||||
{
|
||||
typedef boost::container::vector<int> alloc_or_cont_t;
|
||||
typedef boost::container::flat_set<int, std::less<int>, alloc_or_cont_t> cont;
|
||||
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
|
||||
if (boost::has_trivial_destructor_after_move<cont>::value !=
|
||||
boost::has_trivial_destructor_after_move<tree>::value) {
|
||||
std::cerr << "has_trivial_destructor_after_move(flat_set, vector) test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
|
||||
boost::has_trivial_destructor_after_move<tree>::value
|
||||
, "has_trivial_destructor_after_move(flat_set, vector) test failed");
|
||||
}
|
||||
// flat_set, std::vector
|
||||
{
|
||||
typedef std::vector<int> alloc_or_cont_t;
|
||||
typedef boost::container::flat_set<int, std::less<int>, alloc_or_cont_t> cont;
|
||||
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
|
||||
if (boost::has_trivial_destructor_after_move<cont>::value !=
|
||||
boost::has_trivial_destructor_after_move<tree>::value) {
|
||||
std::cerr << "has_trivial_destructor_after_move(flat_set, std::vector) test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
|
||||
boost::has_trivial_destructor_after_move<tree>::value
|
||||
, "has_trivial_destructor_after_move(flat_set, std::vector) test failed");
|
||||
}
|
||||
// flat_multiset, default
|
||||
{
|
||||
typedef boost::container::flat_multiset<int> cont;
|
||||
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, void> tree;
|
||||
if (boost::has_trivial_destructor_after_move<cont>::value !=
|
||||
boost::has_trivial_destructor_after_move<tree>::value) {
|
||||
std::cerr << "has_trivial_destructor_after_move(flat_multiset, default) test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
|
||||
boost::has_trivial_destructor_after_move<tree>::value
|
||||
, "has_trivial_destructor_after_move(flat_multiset, default) test failed");
|
||||
}
|
||||
// flat_multiset, vector
|
||||
{
|
||||
typedef boost::container::vector<int> alloc_or_cont_t;
|
||||
typedef boost::container::flat_multiset<int, std::less<int>, alloc_or_cont_t> cont;
|
||||
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
|
||||
if (boost::has_trivial_destructor_after_move<cont>::value !=
|
||||
boost::has_trivial_destructor_after_move<tree>::value) {
|
||||
std::cerr << "has_trivial_destructor_after_move(flat_multiset, vector) test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
|
||||
boost::has_trivial_destructor_after_move<tree>::value
|
||||
, "has_trivial_destructor_after_move(flat_multiset, vector) test failed");
|
||||
}
|
||||
// flat_multiset, std::vector
|
||||
{
|
||||
typedef std::vector<int> alloc_or_cont_t;
|
||||
typedef boost::container::flat_multiset<int, std::less<int>, alloc_or_cont_t> cont;
|
||||
typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
|
||||
if (boost::has_trivial_destructor_after_move<cont>::value !=
|
||||
boost::has_trivial_destructor_after_move<tree>::value) {
|
||||
std::cerr << "has_trivial_destructor_after_move(flat_multiset, std::vector) test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
|
||||
boost::has_trivial_destructor_after_move<tree>::value
|
||||
, "has_trivial_destructor_after_move(flat_multiset, std::vector) test failed");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user