Skip to content

Commit

Permalink
deque: Add nodiscard attribute to create* API
Browse files Browse the repository at this point in the history
  • Loading branch information
stotko committed Apr 2, 2024
1 parent ac5b1f7 commit 7b65f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stdgpu/deque.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public:
* \return A newly created object of this class allocated on the GPU (device)
* \pre capacity > 0
*/
static deque<T, Allocator>
[[nodiscard]] static deque<T, Allocator>
createDeviceObject(const index_t& capacity, const Allocator& allocator = Allocator());

/**
Expand All @@ -93,7 +93,7 @@ public:
*/
template <typename ExecutionPolicy,
STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v<remove_cvref_t<ExecutionPolicy>>)>
static deque<T, Allocator>
[[nodiscard]] static deque<T, Allocator>
createDeviceObject(ExecutionPolicy&& policy, const index_t& capacity, const Allocator& allocator = Allocator());

/**
Expand Down

0 comments on commit 7b65f81

Please sign in to comment.