Fix ambiguity in test::basic_stream constructor overloads

This commit is contained in:
Mohammad Nejati
2024-05-11 06:24:00 +00:00
committed by Mohammad Nejati
parent 3461ad1a2b
commit 59310dddac

View File

@@ -235,11 +235,11 @@ public:
@param context The `io_context` object that the stream will use to
dispatch handlers for any asynchronous operations.
*/
template <typename ExecutionContext>
explicit basic_stream(ExecutionContext& context,
typename std::enable_if<
std::is_convertible<ExecutionContext&, net::execution_context&>::value
>::type* = 0)
template <class ExecutionContext,
class = typename std::enable_if<
std::is_convertible<ExecutionContext&, net::execution_context&>::value>::type>
explicit
basic_stream(ExecutionContext& context)
: basic_stream(context.get_executor())
{
}