C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::elide

From: Robert A.H. Leahy <rleahy_at_[hidden]>
Date: Tue, 4 Jun 2024 20:58:12 +0000
No.

This class should not be special cased in the core language.

Old, broken classes aren't worth trying to save in this manner. Just modify, reimplement, or wrap them.

--Robert

On Jun 4, 2024 16:47, Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> wrote:
On Tue, Jun 4, 2024 at 7:32 PM Lénárd Szolnoki wrote:
>
> std::optional has a single argument constructor that
> shouldn't be constrained away for std::elide. In fact
> std::elide is similarly useful to this constructor than
> to emplace.


Should there be two forms of "std::elide"? One with failure, on without failure?

    std::elide -- fails to be the sole parameter to a constructor
    std::elide_nofail -- does not fail to be the sole parameter to a constructor

Or instead of creating two distinct classes, they could be the same
template class but with a bool template parameter:

    std::elide<false> -- fails
    std::elide<true> -- does not fail
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-06-04 20:58:16