mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 22:34:32 +02:00
@@ -1,3 +1,4 @@
|
|||||||
|
* Fix async_connect documentation
|
||||||
* Fix assert in websocket
|
* Fix assert in websocket
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@@ -1165,7 +1165,7 @@ public:
|
|||||||
@code
|
@code
|
||||||
bool connect_condition(
|
bool connect_condition(
|
||||||
error_code const& ec,
|
error_code const& ec,
|
||||||
Iterator next);
|
typename Protocol::endpoint const& next);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
@param handler The completion handler to invoke when the operation
|
@param handler The completion handler to invoke when the operation
|
||||||
|
@@ -1347,9 +1347,60 @@ public:
|
|||||||
resolve_results.end(),
|
resolve_results.end(),
|
||||||
comparison_function,
|
comparison_function,
|
||||||
net::use_awaitable))>);
|
net::use_awaitable))>);
|
||||||
|
|
||||||
|
static_assert(std::is_same_v<
|
||||||
|
net::awaitable<net::ip::tcp::endpoint>, decltype(
|
||||||
|
stream.async_connect(
|
||||||
|
resolve_results,
|
||||||
|
comparison_function,
|
||||||
|
net::use_awaitable))>);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
testConnectionConditionArgs(
|
||||||
|
basic_stream<net::ip::tcp> &stream,
|
||||||
|
net::ip::tcp::resolver::results_type const &results)
|
||||||
|
{
|
||||||
|
struct condition
|
||||||
|
{
|
||||||
|
bool
|
||||||
|
operator()(const error_code &,
|
||||||
|
net::ip::tcp::endpoint const &) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
struct handler
|
||||||
|
{
|
||||||
|
void
|
||||||
|
operator()(error_code const &,
|
||||||
|
net::ip::tcp::endpoint const &) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(std::is_void<decltype(
|
||||||
|
stream.async_connect(
|
||||||
|
results.begin(),
|
||||||
|
results.end(),
|
||||||
|
condition(),
|
||||||
|
handler()))>::value, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
struct handler
|
||||||
|
{
|
||||||
|
void
|
||||||
|
operator()(error_code const &,
|
||||||
|
net::ip::tcp::resolver::results_type::const_iterator);
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(std::is_void<decltype(
|
||||||
|
stream.async_connect(
|
||||||
|
results,
|
||||||
|
condition(),
|
||||||
|
handler()))>::value, "");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
run()
|
run()
|
||||||
{
|
{
|
||||||
@@ -1365,6 +1416,7 @@ public:
|
|||||||
// test for compilation success only
|
// test for compilation success only
|
||||||
boost::ignore_unused(&basic_stream_test::testAwaitableCompilation);
|
boost::ignore_unused(&basic_stream_test::testAwaitableCompilation);
|
||||||
#endif
|
#endif
|
||||||
|
boost::ignore_unused(&basic_stream_test::testConnectionConditionArgs);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user