diff --git a/libstdc++-v3/include/experimental/io_context b/libstdc++-v3/include/experimental/io_context index c82f30cd119..82d7b4f545e 100644 --- a/libstdc++-v3/include/experimental/io_context +++ b/libstdc++-v3/include/experimental/io_context @@ -475,6 +475,9 @@ inline namespace v1 return 0; } + // The caller must know what the wait-type __w will be interpreted. + // In the current implementation the reactor is based on + // so the parameter must be one of POLLIN, POLLOUT or POLLERR. template void async_wait(int __fd, int __w, _Op&& __op) diff --git a/libstdc++-v3/include/experimental/socket b/libstdc++-v3/include/experimental/socket index ec4ed9d95e2..09c3b729607 100644 --- a/libstdc++-v3/include/experimental/socket +++ b/libstdc++-v3/include/experimental/socket @@ -954,7 +954,7 @@ inline namespace v1 } get_executor().context().async_wait( native_handle(), - socket_base::wait_read, + (int) socket_base::wait_read, [__h = std::move(__init.completion_handler), __ep = std::move(__endpoint), __fd = native_handle()] @@ -1165,7 +1165,7 @@ inline namespace v1 __init{__token}; this->get_executor().context().async_wait(this->native_handle(), - socket_base::wait_read, + (int) socket_base::wait_read, [__h = std::move(__init.completion_handler), &__buffers, __flags = static_cast(__flags), __fd = this->native_handle()] @@ -1271,7 +1271,7 @@ inline namespace v1 __init{__token}; this->get_executor().context().async_wait( this->native_handle(), - socket_base::wait_read, + (int) socket_base::wait_read, [__h = std::move(__init.completion_handler), &__buffers, __flags = static_cast(__flags), __sender = std::move(__sender), @@ -1366,7 +1366,7 @@ inline namespace v1 __init{__token}; this->get_executor().context().async_wait( this->native_handle(), - socket_base::wait_write, + (int) socket_base::wait_write, [__h = std::move(__init.completion_handler), &__buffers, __flags = static_cast(__flags), __fd = this->native_handle()] @@ -1469,7 +1469,7 @@ inline namespace v1 __init{__token}; this->get_executor().context().async_wait( this->native_handle(), - socket_base::wait_write, + (int) socket_base::wait_write, [__h = std::move(__init.completion_handler), &__buffers, __flags = static_cast(__flags), __recipient = std::move(__recipient), @@ -1634,7 +1634,7 @@ inline namespace v1 } this->get_executor().context().async_wait(this->native_handle(), - socket_base::wait_read, + (int) socket_base::wait_read, [__h = std::move(__init.completion_handler), &__buffers, __flags = static_cast(__flags), __fd = this->native_handle()] @@ -1741,7 +1741,7 @@ inline namespace v1 } this->get_executor().context().async_wait(this->native_handle(), - socket_base::wait_write, + (int) socket_base::wait_write, [__h = std::move(__init.completion_handler), &__buffers, __flags = static_cast(__flags), __fd = this->native_handle()] @@ -2098,8 +2098,8 @@ inline namespace v1 async_completion<_CompletionToken, void(error_code, socket_type)> __init{__token}; - __ctx.get_executor().context().async_wait(native_handle(), - socket_base::wait_read, + __ctx.async_wait(native_handle(), + (int) socket_base::wait_read, [__h = std::move(__init.completion_handler), __connabort = enable_connection_aborted(), __fd = native_handle(), @@ -2189,8 +2189,8 @@ inline namespace v1 async_completion<_CompletionToken, void(error_code, socket_type)> __init{__token}; - __ctx.get_executor().context().async_wait(native_handle(), - socket_base::wait_read, + __ctx.async_wait(native_handle(), + (int) socket_base::wait_read, [__h = std::move(__init.completion_handler), __ep = std::move(__endpoint), __connabort = enable_connection_aborted(),