Created on 2026-02-05.00:00:00 last changed 1 week ago
(From submission #844.)
Consider:
void f(int p)
pre([&] { ++p; return true; }()) // error: unqualified-id 'p' has const type
pre([&] { ++[:^^p:]; return true; }()) // OK
{}
Constification inside contract assertions applies to unqualified-ids (used as an id-expression) only. Reflection makes it easy to to circumvent this restriction, even though reflection is a compile-time process that could also apply constification.
2026-02-22
Forwarded to EWG with paper issue #2621, by decision of the CWG chair.
EWG 2026-03-24
This issue should be closed as NAD.
EWG 2026-03-26
This issue should be accepted, and is resolved by paper P3598R0.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-03-26 11:52:48 | admin | set | status: nad -> review |
| 2026-03-24 23:13:02 | admin | set | status: open -> nad |
| 2026-02-05 00:00:00 | admin | create | |