Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Avoid returning uninitialized allocator #1009

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions thrust/detail/allocator/allocator_traits.inl
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,8 @@ __host__ __device__
>::type
system(Alloc &)
{
// return a copy of a default-constructed system
typename allocator_system<Alloc>::type result;
return result;
// return a copy of a value-initialized system
return typename allocator_system<Alloc>::type();
}


Expand Down