|
@@ -87,22 +87,22 @@ int main(int, char**)
|
|
|
|
|
|
{
|
|
|
const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
|
|
|
- std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>());
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<int>>);
|
|
|
+ std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>());
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<int>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
}
|
|
|
|
|
|
{
|
|
|
const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
|
|
|
- std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>());
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>>);
|
|
|
+ std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>());
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
}
|
|
|
|
|
|
{
|
|
|
const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
|
|
|
- std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 41));
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
|
|
|
+ std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 41));
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
assert(m.get_allocator().get_id() == 41);
|
|
|
}
|
|
@@ -122,7 +122,7 @@ int main(int, char**)
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>> source;
|
|
|
+ std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>> source;
|
|
|
test_allocator<PC> a(0, 42);
|
|
|
std::unordered_map m(source, a);
|
|
|
ASSERT_SAME_TYPE(decltype(m), decltype(source));
|
|
@@ -131,7 +131,7 @@ int main(int, char**)
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>> source;
|
|
|
+ std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>> source;
|
|
|
test_allocator<PC> a(0, 43);
|
|
|
std::unordered_map m{source, a}; // braces instead of parens
|
|
|
ASSERT_SAME_TYPE(decltype(m), decltype(source));
|
|
@@ -152,20 +152,20 @@ int main(int, char**)
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>());
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>>);
|
|
|
+ std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>());
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>(), std::equal_to<>());
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>>);
|
|
|
+ std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>(), std::equal_to<>());
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 44));
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
|
|
|
+ std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 44));
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
assert(m.get_allocator().get_id() == 44);
|
|
|
}
|
|
@@ -180,8 +180,8 @@ int main(int, char**)
|
|
|
|
|
|
{
|
|
|
const P arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
|
|
|
- std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<PC>(0, 46));
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
|
|
|
+ std::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<PC>(0, 46));
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
assert(m.get_allocator().get_id() == 46);
|
|
|
}
|
|
@@ -194,8 +194,8 @@ int main(int, char**)
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<short>(), test_allocator<PC>(0, 48));
|
|
|
- ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
|
|
|
+ std::unordered_map m({ P{1,1L}, P{2,2L}, P{1,1L}, P{INT_MAX,1L}, P{3,1L} }, 42, std::hash<long long>(), test_allocator<PC>(0, 48));
|
|
|
+ ASSERT_SAME_TYPE(decltype(m), std::unordered_map<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
|
|
|
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
|
|
|
assert(m.get_allocator().get_id() == 48);
|
|
|
}
|