Skip to content

Commit a43f996

Browse files
committed
Deleted copy constructor and assignment for FutureAndRequestId
Signed-off-by: Barry Xu <[email protected]>
1 parent 15674ce commit a43f996

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rclcpp/include/rclcpp/generic_client.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ class GenericClient : public ClientBase
6060

6161
/// See std::future::share().
6262
SharedFuture share() noexcept {return this->future.share();}
63+
64+
/// Move constructor.
65+
FutureAndRequestId(FutureAndRequestId && other) noexcept = default;
66+
/// Deleted copy constructor, each instance is a unique owner of the future.
67+
FutureAndRequestId(const FutureAndRequestId & other) = delete;
68+
/// Move assignment.
69+
FutureAndRequestId & operator=(FutureAndRequestId && other) noexcept = default;
70+
/// Deleted copy assignment, each instance is a unique owner of the future.
71+
FutureAndRequestId & operator=(const FutureAndRequestId & other) = delete;
72+
/// Destructor.
73+
~FutureAndRequestId() = default;
6374
};
6475

6576
GenericClient(

0 commit comments

Comments
 (0)