Boost logo

Boost Users :

Subject: Re: [Boost-users] Using Coroutines in the Visitor Pattern (use-case: BGL event visitor)
From: alex (alexhighviz_at_[hidden])
Date: 2016-01-14 04:31:35


>> It depends how much you are willing to re-implement. It is possible in
>> principle
>
>It is possible in practice, without any reimplementation at all, as
>shown in previous mail.

Your solution is beautiful and a great demonstration of Boost Coroutine.

For what it's worth, I had also used an earlier incarnation of Boost
Coroutine (while it was being reviewed) as a stackful coroutine
implementation, but wasn't so clever in the use of visitors and
reimplemented/copied the algorithm with added yield statements. That
solution was very inefficient and I discarded it.

Boost Coroutine has changed (and surely improved) a lot since then. I would
be curious to know the computational cost of the inversion of control using
your method. Have you tried to quantify it?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net