Created on 2019-08-18.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4830.
Modify [iterator.requirements.general] as indicated:
-16- Iterators are called constexpr iterators if all operations provided to meet iterator category requirements are constexpr functions.
, except for
(16.1) — a pseudo-destructor call ([expr.prim.id.dtor]), and
(16.2) — the construction of an iterator with a singular value.
[ 2019-09-14 Issue Prioritization ]
Status to Tentatively Ready and priority to 0 after five positive votes on the reflector.
The current definition of constexpr iterators is specified in [iterator.requirements.general] p16 as follows:
Iterators are called constexpr iterators if all operations provided to meet iterator category requirements are constexpr functions, except for
(16.1) — a pseudo-destructor call ([expr.prim.id.dtor]), and
(16.2) — the construction of an iterator with a singular value.
With the acceptance of some proposals during the Cologne 2019 meeting, these additional requirements become mostly obsolete, as it had already been pointed out during that meeting:
With the acceptance of P0784R7, destructors can be declared constexpr and it is possible to perform a pseudo-destructor call within a constant expression, so bullet (16.1) is no longer a necessary requirement. With the acceptance of P1331R2, trivial default initialization in constexpr contexts is now possible, and there is no longer a requirement to initialize all sub-objects of a class object within a constant expression. It seems to me that we should simply strike the above two constraining requirements of the definition of constexpr iterators for C++20.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2019-11-19 14:48:30 | admin | set | status: voting -> wp |
2019-10-07 02:48:00 | admin | set | status: ready -> voting |
2019-09-14 12:23:37 | admin | set | messages: + msg10608 |
2019-09-14 12:23:37 | admin | set | status: new -> ready |
2019-08-21 17:50:36 | admin | set | messages: + msg10571 |
2019-08-18 00:00:00 | admin | create |