//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include #include #include #include "test_macros.h" #include "min_allocator.h" #include "test_allocator.h" template void testUnorderedMap() { typedef typename Map::difference_type Diff; { typedef typename Map::iterator It; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } { typedef typename Map::const_iterator It; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } { typedef typename Map::local_iterator It; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } { typedef typename Map::const_local_iterator It; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } } template void testUnorderedSet() { static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); typedef typename Set::difference_type Diff; { typedef typename Set::iterator It; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } { typedef typename Set::local_iterator It; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); } } int main() { { typedef std::unordered_map Map; typedef std::pair ValueTp; testUnorderedMap(); } { typedef std::pair ValueTp; typedef test_allocator Alloc; typedef std::unordered_map, std::equal_to, Alloc> Map; testUnorderedMap(); } #if TEST_STD_VER >= 11 { typedef std::pair ValueTp; typedef min_allocator Alloc; typedef std::unordered_map, std::equal_to, Alloc> Map; testUnorderedMap, min_pointer>(); } #endif { typedef std::unordered_multimap Map; typedef std::pair ValueTp; testUnorderedMap(); } { typedef std::pair ValueTp; typedef test_allocator Alloc; typedef std::unordered_multimap, std::equal_to, Alloc> Map; testUnorderedMap(); } #if TEST_STD_VER >= 11 { typedef std::pair ValueTp; typedef min_allocator Alloc; typedef std::unordered_multimap, std::equal_to, Alloc> Map; testUnorderedMap, min_pointer>(); } #endif { typedef int ValueTp; typedef std::unordered_set Set; testUnorderedSet(); } { typedef int ValueTp; typedef test_allocator Alloc; typedef std::unordered_set, std::equal_to, Alloc> Set; testUnorderedSet(); } #if TEST_STD_VER >= 11 { typedef int ValueTp; typedef min_allocator Alloc; typedef std::unordered_set, std::equal_to, Alloc> Set; testUnorderedSet>(); } #endif { typedef int ValueTp; typedef std::unordered_multiset Set; testUnorderedSet(); } { typedef int ValueTp; typedef test_allocator Alloc; typedef std::unordered_multiset, std::equal_to, Alloc> Set; testUnorderedSet(); } #if TEST_STD_VER >= 11 { typedef int ValueTp; typedef min_allocator Alloc; typedef std::unordered_multiset, std::equal_to, Alloc> Set; testUnorderedSet>(); } #endif }