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 {
4545constexpr bool test () {
4646 { // check that std::allocate_at_least forwards to allocator::allocate if no allocate_at_least exists
4747 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 );
5051 assert (ret.count == 1 );
5152 assert (ret.ptr == &alloc.t );
5253 }
5354
5455 { // check that std::allocate_at_least forwards to allocator::allocate_at_least if allocate_at_least exists
5556 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 );
5860 assert (ret.count == 2 );
5961 assert (ret.ptr == &alloc.t2 );
6062 }
You can’t perform that action at this time.
0 commit comments