[Boost-users] Iterating over each point within a geometry::box

2022-05-11 Thread Keith Bennett via Boost-users
I want to iterate over every point within a geometry::model::box. I want to be able to do that with iterators so that I can also use all (or most of) the standard algorithms like for_each or all_of or etc. Initially my code used several loops, one for each axis, like so for a 2d point: for (int x

[Boost-users] coroutine condition_variable

2023-12-05 Thread Keith Bennett via Boost-users
I'm using asio's awaitable. Couroutines are pretty neat. One of the things that keeps cropping up in the ability to notify another function that something has finished. In the past, I would use condition_variable and wait on that. Is there a better way to do that with coroutines? eg, I want to do

Re: [Boost-users] coroutine condition_variable

2023-12-06 Thread Keith Bennett via Boost-users
t 7:48 PM Vinnie Falco via Boost-users < boost-users@lists.boost.org> wrote: > On Tue, Dec 5, 2023 at 5:43 PM Keith Bennett via Boost-users < > boost-users@lists.boost.org> wrote: > >> One of the things that keeps cropping up in the ability to notify another >> functi

Re: [Boost-users] coroutine condition_variable

2023-12-06 Thread Keith Bennett via Boost-users
On Wed, Dec 6, 2023 at 8:46 AM Richard Hodges via Boost-users < boost-users@lists.boost.org> wrote: > The other way is to use an asio steady_timer. You would cancel the timer > in order to signal the condition. The waiter would see this as an > *operation_aborted* error, which would indicate, "you

Re: [Boost-users] coroutine condition_variable

2023-12-06 Thread Keith Bennett via Boost-users
On Wed, Dec 6, 2023 at 9:20 AM Richard Hodges via Boost-users < boost-users@lists.boost.org> wrote: > Anyway... you could create a `boost::asio::experimental::basic_channel` >> using the signature `(void)` and then `co_await` the channel to suspend the >> coroutine. Later when you want to wake it