MCPcopy Create free account
hub / github.com/boostorg/asio / throw_first

Function throw_first

test/co_composed.cpp:42–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template <typename CompletionToken>
42auto throw_first(CompletionToken&& token)
43{
44 return boost::asio::async_initiate<CompletionToken, void()>(
45 boost::asio::co_composed(
46 [](auto state) -> void
47 {
48 throw 42;
49 co_yield state.complete();
50 }), token);
51}
52
53void test_throw_first()
54{

Callers 1

test_throw_firstFunction · 0.85

Calls 1

completeMethod · 0.45

Tested by 1

test_throw_firstFunction · 0.68