Created on 2025-06-08.00:00:00 last changed 2 weeks ago
Proposed resolution:
This wording is relative to N5008.
Modify [array.zero] as indicated:
-3- The effect of calling `front()` or `back()` for a zero-sized array is undefined.
The intent of P3471 "Standard library hardening" is clearly to provide hardened preconditions for members of sequence containers, including `std::array`. However, a zero-length `std::array` dodges this hardening by having undefined behavior for `front()` and `back()` explicitly specified in [array.zero] paragraph 3.
Without this paragraph, `front()` and `back()` would be hardened as well, as specified in [sequence.reqmts].History | |||
---|---|---|---|
Date | User | Action | Args |
2025-06-14 10:24:43 | admin | set | messages: + msg14828 |
2025-06-08 00:00:00 | admin | create |