Created on 2025-06-08.00:00:00 last changed 5 days 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.
[ 2025-08-21; Reflector poll ]
Set status to Tentatively Ready after eight votes in favour during reflector poll.
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-08-26 14:53:08 | admin | set | messages: + msg14960 |
2025-08-26 14:53:08 | admin | set | status: new -> ready |
2025-06-14 10:24:43 | admin | set | messages: + msg14828 |
2025-06-08 00:00:00 | admin | create |