Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] Combining use_future with strands
From: Gavin Lambert (boost_at_[hidden])
Date: 2018-12-19 05:11:11


On 19/12/2018 12:37, Vinnie Falco wrote:
> On Tue, Dec 18, 2018 at 2:46 PM Gavin Lambert wrote:
>> That seems like a poor tradeoff of names. I hope the former will never
>> be removed and will just typedef to the latter.
>
> Do you think that when Networking TS is merged to the standard in
> 2026, that it should also have both `std::net::strand` and
> `std::net::io_context::strand`?

That's a false equivalence.

If the question is whether these should both exist:

    std::net::strand<Executor>
    std::net::io_context::strand

Where the latter is a typedef/using to
std::net::strand<std::net::io_context::executor_type> ...

Then absolutely, yes, both of these should exist.

Convenience typedefs are not redundant, especially where they both save
typing and are logically easy to find.

Now, if std::net::strand wasn't templated on the executor type, then
that might change the answer.


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