From 26aa1fb96d0b7256dbbfdb4a0d78866ed97eea4f Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Wed, 2 Mar 2022 21:38:43 +1100 Subject: [PATCH] Mark bind_cancellation_slot() result as nodiscard. --- include/boost/asio/bind_cancellation_slot.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/asio/bind_cancellation_slot.hpp b/include/boost/asio/bind_cancellation_slot.hpp index 7bae4bd2..eafb8ec4 100644 --- a/include/boost/asio/bind_cancellation_slot.hpp +++ b/include/boost/asio/bind_cancellation_slot.hpp @@ -459,7 +459,8 @@ private: /// Associate an object of type @c T with a cancellation slot of type /// @c CancellationSlot. template -inline cancellation_slot_binder::type, CancellationSlot> +BOOST_ASIO_NODISCARD inline +cancellation_slot_binder::type, CancellationSlot> bind_cancellation_slot(const CancellationSlot& s, BOOST_ASIO_MOVE_ARG(T) t) { return cancellation_slot_binder<