Affected subclause: [associative.reqmts]
Change: Requirements change:
Rationale: Increase portability, clarification of associative container requirements
. 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++
. For example:
#include <set>
struct compare
{
bool operator()(int a, int b)
{
return a < b;
}
};
int main() {
const std::set<int, compare> s;
s.find(0);
}