post_ack_handle
post_ack_handle
is the value handle class of post-ack. It has methods to obtain
a pointer to the value and to acknowledge the value.
Prototype
template <typename T>
struct post_ack_handle {
friend void swap(post_ack_handle &a, post_ack_handle &b); // (1)
explicit post_ack_handle() = default; // (2)
post_ack_handle(const post_ack_handle &) = delete;
post_ack_handle(post_ack_handle &&); // (3)
post_ack_handle &operator=(const post_ack_handle &) = delete;
post_ack_handle &operator=(post_ack_handle &&); // (3)
void ack(); // (4)
explicit operator bool (); // (5)
T *operator-> (); // (6)
T &operator* (); // (6)
};
- Swaps two handles.
- Constructs an empty handle.
- Moves a handle.
- Acknowledges the value.
- Checks if the handle is valid.
- Gets the stored object.
Requirements
T
is moveable.
Return values
- This function doesn't return any value.
- N/A
- N/A for constructor, reference to the handle for assignment operator.
- This method doesn't return any value.
- This method returns
true
if the handle isn't empty,false
otherwise. - These methods return a pointer/reference to the handle.