Opened 6 years ago

Last modified 5 years ago

#12709 new Bugs

Boost.Asio uses Boost.Coroutine v1, yet Boost.Coroutine v2 references it as a usage example

Reported by: Antoine Poliakov <antoinep92@…> Owned by: olli
Milestone: To Be Determined Component: coroutine
Version: Boost 1.62.0 Severity: Problem
Keywords: coroutine2 asio spawn yield Cc:

Description

In http://www.boost.org/doc/libs/1_62_0/libs/coroutine2/doc/html/coroutine2/motivation.html there is a code sample using boost::asio::yield to demonstrate the benefits of using coroutines.

This code sample seems to be copy-pasted from Boost.Coroutine v1 http://www.boost.org/doc/libs/1_62_0/libs/coroutine/doc/html/coroutine/motivation.html, and it's quite misleading since from what I can tell (documentation and include chains in the code, boost::asio::yield is built on top of Coroutine v1 and not Coroutine2.

So if I try to build the code sample from Coroutine2 documentation, I get a warning saying that Boost.Coroutine is deprecated and I should be using the v2, which I thought I was because that's where the sample came from.

Ideally it would be good if Boost.ASIO was ported to Coroutine v2, but in the meantime it might be better to remove the ASIO code sample in Coroutine v2 documentation.

Change History (2)

comment:1 by Kohei Takahashi, 6 years ago

Owner: changed from Matias Capeletto to olli

comment:2 by anonymous, 5 years ago

Component: Documentationcoroutine
Note: See TracTickets for help on using tickets.