forked from boostorg/container
Reduce redundant instantiations to improve test build times
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
#include <set>
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/container/allocator.hpp>
|
||||
#include <boost/container/node_allocator.hpp>
|
||||
#include <boost/container/adaptive_pool.hpp>
|
||||
|
||||
#include "print_container.hpp"
|
||||
#include "dummy_test_allocator.hpp"
|
||||
@@ -34,90 +32,34 @@ namespace container {
|
||||
//Explicit instantiation to detect compilation errors
|
||||
|
||||
//flat_set
|
||||
template class flat_set
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, test::dummy_test_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_set
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, test::simple_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_set
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, std::allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_set
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_set
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, adaptive_pool<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_set
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, node_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
//flat_multiset
|
||||
template class flat_multiset
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, test::dummy_test_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_multiset
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, test::simple_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_multiset
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, std::allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_multiset
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_multiset
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, adaptive_pool<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_multiset
|
||||
< test::movable_and_copyable_int
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, node_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
namespace container_detail {
|
||||
|
||||
//Instantiate base class as previous instantiations don't instantiate inherited members
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
, test::movable_and_copyable_int
|
||||
, identity<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, test::dummy_test_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
, test::movable_and_copyable_int
|
||||
@@ -126,14 +68,6 @@ template class flat_tree
|
||||
, test::simple_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
, test::movable_and_copyable_int
|
||||
, identity<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, std::allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
, test::movable_and_copyable_int
|
||||
@@ -142,22 +76,6 @@ template class flat_tree
|
||||
, allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
, test::movable_and_copyable_int
|
||||
, identity<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, adaptive_pool<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
template class flat_tree
|
||||
< test::movable_and_copyable_int
|
||||
, test::movable_and_copyable_int
|
||||
, identity<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, node_allocator<test::movable_and_copyable_int>
|
||||
>;
|
||||
|
||||
} //container_detail {
|
||||
|
||||
//As flat container iterators are typedefs for vector::[const_]iterator,
|
||||
@@ -588,16 +506,6 @@ int main()
|
||||
std::cerr << "test_set_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// boost::container::node_allocator
|
||||
if(test_set_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_set_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// boost::container::adaptive_pool
|
||||
if(test_set_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_set_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
|
||||
Reference in New Issue
Block a user