From 91a3159ffabaa26cf0010cbe55b24703c7435348 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Tue, 4 Apr 2023 20:16:35 +1000 Subject: [PATCH] Avoid evaluating concept when Executor1 is not an executor. --- include/boost/asio/basic_socket_acceptor.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/boost/asio/basic_socket_acceptor.hpp b/include/boost/asio/basic_socket_acceptor.hpp index 4c26d51e..a9d1d25e 100644 --- a/include/boost/asio/basic_socket_acceptor.hpp +++ b/include/boost/asio/basic_socket_acceptor.hpp @@ -1925,8 +1925,10 @@ public: template ::other)) MoveAcceptToken - BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> + typename constraint::value + || execution::is_executor::value, + Executor1>::type>::other)) MoveAcceptToken + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, void (boost::system::error_code, typename Protocol::socket::template rebind_executor< @@ -2487,8 +2489,10 @@ public: template ::other)) MoveAcceptToken - BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> + typename constraint::value + || execution::is_executor::value, + Executor1>::type>::other)) MoveAcceptToken + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(MoveAcceptToken, void (boost::system::error_code, typename Protocol::socket::template rebind_executor<