2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-27 15:12:12 +00:00

Mark bind_cancellation_slot() result as nodiscard.

This commit is contained in:
Christopher Kohlhoff
2022-03-02 21:38:43 +11:00
parent 9ab631ecf8
commit 26aa1fb96d

View File

@@ -459,7 +459,8 @@ private:
/// Associate an object of type @c T with a cancellation slot of type
/// @c CancellationSlot.
template <typename CancellationSlot, typename T>
inline cancellation_slot_binder<typename decay<T>::type, CancellationSlot>
BOOST_ASIO_NODISCARD inline
cancellation_slot_binder<typename decay<T>::type, CancellationSlot>
bind_cancellation_slot(const CancellationSlot& s, BOOST_ASIO_MOVE_ARG(T) t)
{
return cancellation_slot_binder<