Annex C (informative) Compatibility [diff]

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

C.1.5 [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
Affected subclause: [format]
Change: Signature changes: format, format_­to, format_­to_­n, formatted_­size.

Rationale: Enable formatting of views that do not support iteration when const-qualified and that are not copyable.

Effect on original feature: Valid C++ 2020 code that passes bit fields to formatting functions may become ill-formed.
For example: struct tiny { int bit: 1; }; auto t = tiny(); std::format("{}", t.bit); // ill-formed, previously returned "0"