Date: Tue, 4 Jun 2024 21:46:55 +0100
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::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
Received on 2024-06-04 20:47:09