[diff.cpp23.lex] (original) (raw)
Annex C (informative) Compatibility [diff]
C.1 C++ and ISO C++ 2023 [diff.cpp23]
C.1.2 [lex]: lexical conventions [diff.cpp23.lex]
Affected subclause: [lex.operators]
Change: New operator ^^.
Rationale: Required for new features.
Effect on original feature: Valid C++ 2023 code that contains two consecutive ^ tokens can be ill-formed in this revision of C++.
[Example 1: struct C { int operator^(int); };int operator^(int (C::*p)(int), C);int i = &C::operator^^C{}; — _end example_]
Affected subclause: [lex.key]
Change: New keywords.
Rationale: Required for new features.
- The contract_assert keyword is added to introduce a contract assertion through an assertion-statement ([stmt.contract.assert]).
Effect on original feature: Valid C++ 2023 code using contract_assert as an identifier is not valid in this revision of C++.