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

31 lines
1009 B
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.cpp14.containers]
# Annex C (informative) Compatibility [[diff]](./#diff)
## C.4 C++ and ISO C++ 2014 [[diff.cpp14]](diff.cpp14#containers)
### C.4.11 [[containers]](containers "23Containers library"): containers library [diff.cpp14.containers]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1899)
**Affected subclause:** [[associative.reqmts]](associative.reqmts)
**Change:** Requirements change:
**Rationale:** Increase portability, clarification of associative container requirements[.](#1.sentence-2)
**Effect on original feature:** Valid C++ 2014 code that attempts to use associative containers
having a comparison object with non-const function call operator
may fail to compile in this revision of C++[.](#1.sentence-3)
[*Example [1](#example-1)*: #include <set>struct compare{bool operator()(int a, int b){return a < b; }};
int main() {const std::set<int, compare> s;
s.find(0);} — *end example*]