2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-22 13:42:08 +00:00

Ensure this_coro helper structs have explicit 1-arg constructors.

To prevent implicit conversion in co_await expressions.
This commit is contained in:
Christopher Kohlhoff
2023-04-04 20:17:55 +10:00
parent a33370cbe0
commit 7bab8d55dc

View File

@@ -194,7 +194,7 @@ template <typename Filter>
struct reset_cancellation_state_1_t
{
template <typename F>
BOOST_ASIO_CONSTEXPR reset_cancellation_state_1_t(
explicit BOOST_ASIO_CONSTEXPR reset_cancellation_state_1_t(
BOOST_ASIO_MOVE_ARG(F) filt)
: filter(BOOST_ASIO_MOVE_CAST(F)(filt))
{
@@ -257,7 +257,7 @@ throw_if_cancelled()
struct throw_if_cancelled_1_t
{
BOOST_ASIO_CONSTEXPR throw_if_cancelled_1_t(bool val)
explicit BOOST_ASIO_CONSTEXPR throw_if_cancelled_1_t(bool val)
: value(val)
{
}