Repository navigation
[2026-11 CWG Motion 3] P4451R2 Early Adoption of an Always-Enforced Label - #9418
Conversation
| \defnxname{cpp_constexpr_virtual_inheritance} & \tcode{202506L} \\ \rowsep | ||
| \defnxname{cpp_constinit} & \tcode{201907L} \\ \rowsep | ||
| \defnxname{cpp_contracts} & \tcode{202606L} \\ \rowsep | ||
| \defnxname{cpp_contracts} & \tcode{202611L} \\ \rowsep |
There was a problem hiding this comment.
Previously __cpp_contracts was bumped to 202606L by P3097R3. IIUC P3097R3 targets C++29 while P4451R2 targets C++26. Could the value 202611L cause problem in C++26, as it indicates that P3097R3 is supported, but in fact it's not in C++26?
There was a problem hiding this comment.
interesting times call for interesting solutions.
i think we will want to leave this alone, and then possiblely open a core issue to bump the c++29 macro version.
There was a problem hiding this comment.
Although the value could be arbitrary, I personally slightly prefer to make the C++26 value lower than or equal to 202603L (the value of __cplusplus).
There was a problem hiding this comment.
i wouldn't object to that, but I would revert it from this pr and then just update it in the DIS. (the WD would stay with the p3097 value)
There was a problem hiding this comment.
I see no reason to diverge from the wording that the working group has just approved. I assume they had their reasons.
@jensmaurer Is there an oversight here that we should correct?
There was a problem hiding this comment.
to match the date of the DIS.
Dis is very imprecisely worded.
There was a problem hiding this comment.
the entire admin group moved to form the van group with me as chair. lewgi and sg23 seconded.
There was a problem hiding this comment.
I think we had a reflector discussion about this topic, with a sort-of consensus outcome. The issue was not mentioned in CWG.
There was a problem hiding this comment.
OK, let's adopt the paper as is into both documents, and then separately update the value to 202612L for the C++29 working draft only, with the intention of indicatiing support for P3097.
932073f to
559872f
Compare
559872f to
b1a3b7b
Compare
Paper P3097R3 was adopted in Brno 2026 for C++29 and changed the __cpp_contracts macro to "202606L". At that point, the first DIS for C++26 retained the previous value "202502L". With the adoption of P4451R2 for the second DIS for C++26 as well as for the C++29 working draft, the value of the macro needs to be changed again, but we need for C++26 to not depend on any material from C++29. We are therefore updating __cpp_contracts as well as __cplusplus to "202611L" for P4451R2, and conformance with P3097R3 in C++29 is now indicated by the value "202612L".
Fixes #9399
Also fixes cplusplus/papers#2950
Also fixes cplusplus/nbballot#1001