Ensure each container type can be explicitly instantiated

This commit is contained in:
Braden Ganetsky 2024-10-06 22:38:00 -05:00
parent 489b50bc0f
commit cfdfae0a65
11 changed files with 56 additions and 0 deletions

View File

@ -190,6 +190,7 @@ namespace boost {
}
template <bool avoid_explicit_instantiation = true>
concurrent_flat_map(
unordered_flat_map<Key, T, Hash, Pred, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -187,6 +187,7 @@ namespace boost {
}
template <bool avoid_explicit_instantiation = true>
concurrent_flat_set(
unordered_flat_set<Key, Hash, Pred, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -197,6 +197,7 @@ namespace boost {
{
}
template <bool avoid_explicit_instantiation = true>
concurrent_node_map(
unordered_node_map<Key, T, Hash, Pred, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -194,6 +194,7 @@ namespace boost {
{
}
template <bool avoid_explicit_instantiation = true>
concurrent_node_set(
unordered_node_set<Key, Hash, Pred, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -182,6 +182,7 @@ namespace boost {
{
}
template <bool avoid_explicit_instantiation = true>
unordered_flat_map(
concurrent_flat_map<Key, T, Hash, KeyEqual, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -178,6 +178,7 @@ namespace boost {
{
}
template <bool avoid_explicit_instantiation = true>
unordered_flat_set(
concurrent_flat_set<Key, Hash, KeyEqual, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -189,6 +189,7 @@ namespace boost {
{
}
template <bool avoid_explicit_instantiation = true>
unordered_node_map(
concurrent_node_map<Key, T, Hash, KeyEqual, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -187,6 +187,7 @@ namespace boost {
{
}
template <bool avoid_explicit_instantiation = true>
unordered_node_set(
concurrent_node_set<Key, Hash, KeyEqual, Allocator>&& other)
: table_(std::move(other.table_))

View File

@ -163,6 +163,10 @@ compile-fail unordered/insert_node_type_fail.cpp : <define>UNORDERED_TEST_MULTIM
compile-fail unordered/insert_node_type_fail.cpp : <define>UNORDERED_TEST_SET : insert_node_type_fail_set ;
compile-fail unordered/insert_node_type_fail.cpp : <define>UNORDERED_TEST_MULTISET : insert_node_type_fail_multiset ;
compile unordered/explicit_instantiation_tests.cpp : : fca_explicit_instantiation_tests ;
compile unordered/explicit_instantiation_tests.cpp : <define>BOOST_UNORDERED_FOA_TESTS : foa_explicit_instantiation_tests ;
compile cfoa/explicit_instantiation_tests.cpp : : cfoa_explicit_instantiation_tests ;
local FCA_EXCEPTION_TESTS =
constructor_exception_tests
copy_exception_tests

View File

@ -0,0 +1,15 @@
// Copyright 2024 Braden Ganetsky
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/unordered/concurrent_flat_map.hpp>
#include <boost/unordered/concurrent_flat_set.hpp>
#include <boost/unordered/concurrent_node_map.hpp>
#include <boost/unordered/concurrent_node_set.hpp>
template class boost::concurrent_flat_map<int, int>;
template class boost::concurrent_flat_set<int>;
template class boost::concurrent_node_map<int, int>;
template class boost::concurrent_node_set<int>;
int main() { return 0; }

View File

@ -0,0 +1,29 @@
// Copyright 2024 Braden Ganetsky
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#ifdef BOOST_UNORDERED_FOA_TESTS
#include <boost/unordered/unordered_flat_map.hpp>
#include <boost/unordered/unordered_flat_set.hpp>
#include <boost/unordered/unordered_node_map.hpp>
#include <boost/unordered/unordered_node_set.hpp>
template class boost::unordered_flat_map<int, int>;
template class boost::unordered_flat_set<int>;
template class boost::unordered_node_map<int, int>;
template class boost::unordered_node_set<int>;
#else
#include <boost/unordered/unordered_map.hpp>
#include <boost/unordered/unordered_set.hpp>
template class boost::unordered_map<int, int>;
template class boost::unordered_multimap<int, int>;
template class boost::unordered_multiset<int>;
template class boost::unordered_set<int>;
#endif // BOOST_UNORDERED_FOA_TESTS
int main() { return 0; }