Files
2025-10-25 03:02:53 +03:00

1.5 KiB

[diff.cpp23.lex]

Annex C (informative) Compatibility [diff]

C.1 C++ and ISO C++ 2023 [diff.cpp23]

C.1.2 [lex]: lexical conventions [diff.cpp23.lex]

1

#

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{}; // ill-formed; previously well-formed — end example]

2

#

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++.