C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Requirement on emptiness of standard library classes

From: Jeremy Rifkin <jeremy_at_[hidden]>
Date: Sat, 19 Apr 2025 14:41:45 -0500
Hi,
Another empty type in the standard library is monostate. The wording
doesn't say explicitly say "empty," however, an empty definition is
provided. I don't know if this would allow an implementation to add
private members. What's your motivation for wanting more specification
here, though?

Cheers,
Jeremy

On Apr 19 2025, at 1:10 pm, F. v.S. via Std-Proposals
<std-proposals_at_[hidden]> wrote:

> If I understand correctly, among all standard library classes, only
> allocator_arg_t, default_sentinel_t, nullopt_t, and
> piecewise_construct_t are required to be empty in the currently
> standard wording. But perhaps there should be more, and it's also a
> bit surprising that empty_view specializations are not yet required to
> be empty.
>
> Is the status quo intended?
>
> Thanks,
> F.v.S.
> --
>
> Std-Proposals mailing list
>
> Std-Proposals_at_[hidden]
>
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2025-04-19 19:41:51