C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Copy-construct, move-construct, and PR-construct

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Wed, 23 Aug 2023 19:26:13 -0800
On Wed, Aug 23, 2023 at 5:31 PM Thiago Macieira via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
> How about instead we add a constructor to std::mutex to allow it to be
> born locked?


Well, because the issue here isn't *really* about making a mutex that's
locked. That's just a very convenient *concrete example *of the general
problem. If we gave std::mutex a constructor that allowed it to be born
locked, then we'd have to invent a *new* concrete example to demonstrate
the general problem. (Like maybe "making a vector with a given capacity.")

–Arthur

Received on 2023-08-24 03:26:28