/* Copyright (c) 2005-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #if __INTEL_COMPILER && _MSC_VER #pragma warning(disable : 2586) // decorated name length exceeded, name was truncated #endif #define TBB_DEFINE_STD_HASH_SPECIALIZATIONS 1 #include #include "common/concurrent_unordered_common.h" //! \file test_concurrent_unordered_map.cpp //! \brief Test for [containers.concurrent_unordered_map containers.concurrent_unordered_multimap] specifications template struct AllowMultimapping> : std::true_type {}; template using MyAllocator = LocalCountingAllocator>>; using move_support_tests::FooWithAssign; using map_type = tbb::concurrent_unordered_map, std::equal_to, MyAllocator>; using multimap_type = tbb::concurrent_unordered_multimap, std::equal_to, MyAllocator>; using degenerate_map_type = tbb::concurrent_unordered_map, std::equal_to, MyAllocator>; using degenerate_multimap_type = tbb::concurrent_unordered_multimap, std::equal_to, MyAllocator>; using checked_map_type = tbb::concurrent_unordered_map, std::hash, std::equal_to, MyAllocator>>; using checked_multimap_type = tbb::concurrent_unordered_multimap, std::hash, std::equal_to, MyAllocator>>; using checked_state_map_type = tbb::concurrent_unordered_map, std::equal_to, MyAllocator>; using checked_state_multimap_type = tbb::concurrent_unordered_multimap, std::equal_to, MyAllocator>; struct CumapTraits : UnorderedMoveTraitsBase { template using container_type = tbb::concurrent_unordered_map, std::equal_to, Allocator>; template using container_value_type = std::pair; using init_iterator_type = move_support_tests::FooPairIterator; }; // struct CumapTraits struct CumultimapTraits : UnorderedMoveTraitsBase { template using container_type = tbb::concurrent_unordered_multimap, std::equal_to, Allocator>; template using container_value_type = std::pair; using init_iterator_type = move_support_tests::FooPairIterator; }; // struct CumultimapTraits template <> struct SpecialTests { static void Test() { SpecialMapTests(); } }; template <> struct SpecialTests { static void Test() { SpecialMultiMapTests(); } }; struct UnorderedMapTypesTester { template