Date: Tue, 9 Jul 2019 13:46:51 +0100
On Tue, Jul 9, 2019, 11:11 AM Jordi Vilar via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> After changing the index_type from signed to unsigned, the sign of the
> dynamic_extent constant also changed from -1 to the maximum unsigned value.
> This changes also the meaning of the expression 'size() <= 0'.
>
> In the lasts drafts (N4810 & N4820), section [span.cons] documents the
> default constructor as:
>
>
>
> *22.7.3.2 Constructors, copy, and assignment [span.cons]constexpr span()
> noexcept;*1 *Constraints:* *Extent <= 0* is true.
> 2 *Ensures:* size() == 0 && data() == nullptr.
>
> I think the constraint is now broken and should be reworded as 'Extent ==
> 0 || Extent == dynamic_extent'.
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> http://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Yep, this is LWG3198, with the same proposed resolution.
Barry
std-proposals_at_[hidden]> wrote:
> After changing the index_type from signed to unsigned, the sign of the
> dynamic_extent constant also changed from -1 to the maximum unsigned value.
> This changes also the meaning of the expression 'size() <= 0'.
>
> In the lasts drafts (N4810 & N4820), section [span.cons] documents the
> default constructor as:
>
>
>
> *22.7.3.2 Constructors, copy, and assignment [span.cons]constexpr span()
> noexcept;*1 *Constraints:* *Extent <= 0* is true.
> 2 *Ensures:* size() == 0 && data() == nullptr.
>
> I think the constraint is now broken and should be reworded as 'Extent ==
> 0 || Extent == dynamic_extent'.
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> http://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Yep, this is LWG3198, with the same proposed resolution.
Barry
Received on 2019-07-09 07:48:57