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

52 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[diff.cpp03.strings]
# Annex C (informative) Compatibility [[diff]](./#diff)
## C.6 C++ and ISO C++ 2003 [[diff.cpp03]](diff.cpp03#strings)
### C.6.11 [[strings]](strings "27Strings library"): strings library [diff.cpp03.strings]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2535)
**Affected subclause:** [[string.classes]](string.classes)
**Change:** basic_string requirements no longer allow reference-counted
strings[.](#1.sentence-1)
**Rationale:** Invalidation is subtly different with reference-counted strings[.](#1.sentence-2)
This change regularizes behavior[.](#1.sentence-3)
**Effect on original feature:** Valid C++ 2003 code may execute differently in this revision of C++[.](#1.sentence-4)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L2545)
**Affected subclause:** [[string.require]](string.require)
**Change:** Loosen basic_string invalidation rules[.](#2.sentence-1)
**Rationale:** Allow small-string optimization[.](#2.sentence-2)
**Effect on original feature:** Valid C++ 2003 code may execute differently in this revision of C++[.](#2.sentence-3)
Some const member functions, such as data and c_str,
no longer invalidate iterators[.](#2.sentence-4)