Boost logo

Boost :

From: Christian Mazakas (christian.mazakas_at_[hidden])
Date: 2024-12-19 16:18:58


On Thu, Dec 19, 2024 at 7:52 AM Vinnie Falco <vinnie.falco_at_[hidden]> wrote:

> try_find( users, user_id ).map(
> [](auto& user)
> {
> user.status = deactivated;
> return user;
> });
>

 Yup, exactly.

My point was that users don't want this compared to the method chaining
version and
I think the code here kind of speaks for itself.

users.try_find().map() is the preferred API over try_find(user).map().

- Christian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk