Annex C (informative) Compatibility [diff]

C.1 C++ and ISO C++ 2020 [diff.cpp20]

C.1.1 General [diff.cpp20.general]

Subclause [diff.cpp20] lists the differences between C++ and ISO C++ 2020 (ISO/IEC 14882:2020, Programming Languages — C++), by the chapters of this document.

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

Affected subclause: []
Change: Previously valid identifiers containing characters not present in UAX #44 properties XID_Start or XID_Continue, or not in Normalization Form C, are now rejected.

Rationale: Prevent confusing characters in identifiers.
Requiring normalization of names ensures consistent linker behavior.

Effect on original feature: Some identifiers are no longer well-formed.
Affected subclause: [lex.string]
Change: Concatenated string-literals can no longer have conflicting encoding-prefixes.

Rationale: Removal of unimplemented conditionally-supported feature.

Effect on original feature: Concatenation of string-literals with different encoding-prefixes is now ill-formed.
[Example 1: auto c = L"a" U"b"; // was conditionally-supported; now ill-formed — end example]

C.1.3 [utilities]: general utilities library [diff.cpp20.utilities]

Affected subclause: [format]
Change: Signature changes: format, format_­to, vformat_­to, format_­to_­n, formatted_­size.
Removal of format_­args_­t.

Rationale: Improve safety via compile-time format string checks, avoid unnecessary template instantiations.

Effect on original feature: Valid C++ 2020 code that contained errors in format strings or relied on previous format string signatures or format_­args_­t may become ill-formed.
For example: auto s = std::format("{:d}", "I am not a number"); // ill-formed, // previously threw format_­error