Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Checks:
- '-bugprone-unintended-char-ostream-output'
- '-bugprone-casting-through-void'
- '-bugprone-integer-division'
- '-bugprone-move-forwarding-reference'
- '-bugprone-pointer-arithmetic-on-polymorphic-object'
- '-bugprone-argument-comment'
# This is just noise
Expand Down
7 changes: 2 additions & 5 deletions thrust/thrust/detail/allocator_aware_execution_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <cuda/std/__cstddef/types.h>
#include <cuda/std/__type_traits/enable_if.h>
#include <cuda/std/__type_traits/is_reference.h>
#include <cuda/std/__utility/move.h>
#include <cuda/std/__utility/forward.h>

THRUST_NAMESPACE_BEGIN

Expand Down Expand Up @@ -68,14 +68,11 @@ struct allocator_aware_execution_policy
return typename execute_with_allocator_type<Allocator>::type(alloc);
}

// just the rvalue overload
// perfect forwarding doesn't help, because a const reference has to be turned
// into a value by copying for the purpose of storing it in execute_with_allocator
_CCCL_EXEC_CHECK_DISABLE
template <typename Allocator, ::cuda::std::enable_if_t<!::cuda::std::is_lvalue_reference_v<Allocator>>* = nullptr>
_CCCL_HOST_DEVICE typename execute_with_allocator_type<Allocator>::type operator()(Allocator&& alloc) const
{
return typename execute_with_allocator_type<Allocator>::type(::cuda::std::move(alloc));
return typename execute_with_allocator_type<Allocator>::type(::cuda::std::forward<Allocator>(alloc));
}
};
} // end namespace detail
Expand Down
Loading