This is not as generic as you were proposing.
The apply function forces the user to chose what is the scope of locking for multiple operations. So the compiler doesn't have to magically figure out in
if (container.empty()) container.push();
It should lock twice or just once. This os given by the user.

See also:

Em qui., 1 de jun. de 2023 21:05, Phil Bouchard via Std-Proposals <> escreveu:

On 6/1/23 12:26, Jason McKesson via Std-Proposals wrote:

> If you want "more positive feedback", you should strive not to come to
> a fact-fight unarmed.

A generic solution is right here and it solves exactly the problem I was

That basically proves again your negative evaluation of everything was
in vain. Honestly there's a thin line between trolling and your comments
to my regards for some reason.

Logo <
*Phil Bouchard*         facebook icon
Founder & CEO
T: (819) 328-4743
E:| <>
8 rue de la Baie| Gatineau (Qc), J8T 3H3 Canada

Banner <> Le message ci-dessus, ainsi que les
documents l'accompagnant, sont destinés uniquement aux personnes
identifiées et peuvent contenir des informations privilégiées,
confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce
message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named
recipients only and may contain privileged or confidential information
which is not to be disclosed. If you received this communication by
mistake please destroy all copies.

Std-Proposals mailing list