Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clone method to Reply #290

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Changes from 3 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
11 changes: 10 additions & 1 deletion include/zenoh/api/reply.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@ class Reply : public Owned<::z_owned_reply_t> {
return {};
}
#endif

/// @brief Construct a shallow copy of this Reply.
///
/// The reply will be sent only when the last clone is destroyed.
Reply clone() const {
Reply q(zenoh::detail::null_object);
milyin marked this conversation as resolved.
Show resolved Hide resolved
::z_reply_clone(&q._0, interop::as_loaned_c_ptr(*this));
return q;
};
};

} // namespace zenoh
#endif
#endif
Loading