File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -45,16 +45,18 @@ struct has_allocate_at_least {
45
45
constexpr bool test () {
46
46
{ // check that std::allocate_at_least forwards to allocator::allocate if no allocate_at_least exists
47
47
no_allocate_at_least<int > alloc;
48
- std::same_as<std::allocation_result<int *>> decltype (auto ) ret =
49
- std::allocator_traits<decltype (alloc)>::allocate_at_least (alloc, 1 );
48
+ using AllocTraits = std::allocator_traits<decltype (alloc)>;
49
+ std::same_as<std::allocation_result<int *, AllocTraits::size_type>> decltype (auto ) ret =
50
+ AllocTraits::allocate_at_least (alloc, 1 );
50
51
assert (ret.count == 1 );
51
52
assert (ret.ptr == &alloc.t );
52
53
}
53
54
54
55
{ // check that std::allocate_at_least forwards to allocator::allocate_at_least if allocate_at_least exists
55
56
has_allocate_at_least<int > alloc;
56
- std::same_as<std::allocation_result<int *>> decltype (auto ) ret =
57
- std::allocator_traits<decltype (alloc)>::allocate_at_least (alloc, 1 );
57
+ using AllocTraits = std::allocator_traits<decltype (alloc)>;
58
+ std::same_as<std::allocation_result<int *, AllocTraits::size_type>> decltype (auto ) ret =
59
+ AllocTraits::allocate_at_least (alloc, 1 );
58
60
assert (ret.count == 2 );
59
61
assert (ret.ptr == &alloc.t2 );
60
62
}
You can’t perform that action at this time.
0 commit comments