This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.

### 3198. Bad constraint on `std::span::span()`

Section: 22.7.3.2 [span.cons] Status: C++20 Submitter: Lars Gullik Bjønnes Opened: 2019-04-03 Last modified: 2021-02-25

Priority: Not Prioritized

View all other issues in [span.cons].

View all issues with C++20 status.

Discussion:

It seems that this was left out of P1089. The constraint on `span()` (22.7.3.2 [span.cons]) in the current draft is:

> Constraints: `Extent <= 0` is `true`.

This does not seem to make much sense.

The proposal is to change the constraint to be:

> Constraints: `Extent == dynamic_extent || Extent == 0` is `true`.

[2019-06-09; Priority to 0 and Status to Tentatively Ready after five positive votes on the reflector.]

Proposed resolution:

This wording is relative to N4810.

1. Modify 22.7.3.2 [span.cons] as indicated:

   >     constexpr span() noexcept;

   > > -1- Constraints: `Extent <== dynamic_extent || Extent == 0` is `true`.