I'd like to suggest an improvement to the name.
std::elide suggests we elide something, but not what we elide. Copy elision is not elision, it's a more specific concept.
We could call id std::elide_copying, but I think it's still too roundabout.
I'd call it std::construct_with_returning(). e.g. std::construct_with_returning<ClassName>(arg1, args2, arg3). It's a direct name for simple helper. In a call site
return std::construct_with_returning<...>(...)
It's clear we're constructing a new object and what the new object's type is.
On Sat, 2024-03-09 at 21:13 +0000, Frederick Virchanza Gotham via Std-Proposals wrote:
Add a new function to the standard library to make possible the
emplacement of an unmovable-and-uncopiable prvalue into types such as
std::optional, std::variant, std::any -- without requiring an
alteration to the definitions of these classes.
Also it's attached to this email.