On Mon, Apr 15, 2024 at 8:30 AM Frederick Virchanza Gotham wrote:
>
> A and B both allow us to do the following: Emplace an
> unmovable-and-uncopyable PRvalue into an std::optional, std::variant.
This is now P3288:
virjacode.com/papers/p3288.htm
[...] I'm going to try get it put to a vote at the next meeting [...]
Your "Proposed Wording" is only one sentence. It refers to something called "std::elide," which is never defined in the wording.
Your section 1 claims that it's not possible to emplace a `counting_semaphore` into an `optional`, but in fact section 2.1 shows that it is possible.
The thing that's actually impossible in today's C++ is to return a mutated immovable object, as in:
std::mutex ReturnLockedMutex() {
std::mutex m;
m.lock();
return m;
}
and your `std::elide` idea doesn't help with that.
–Arthur