You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Patch from ngolovliov@gmail.com Reviewed as: https://reviews.llvm.org/D42344 As described in llvm.org/PR30959, the current implementation of std::{map, key}::{count, equal_range} in libcxx is non-conforming. Quoting the C++14 standard [associative.reqmts]p3 > The phrase “equivalence of keys” means the equivalence relation imposed by > the comparison and not the operator== on keys. That is, two keys k1 and k2 are > considered to be equivalent if for the comparison object comp, > comp(k1, k2) == false && comp(k2, k1) == false. In the same section, the requirements table states the following: > a.equal_range(k) equivalent to make_pair(a.lower_bound(k), a.upper_bound(k)) > a.count(k) returns the number of elements with key equivalent to k The behaviour of libstdc++ seems to conform to the standard here. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324799 91177308-0d34-0410-b5e6-96231b3b80d8 |
8 years ago | |
|---|---|---|
| .. | ||
| count.pass.cpp | ||
| count0.pass.cpp | ||
| count1.fail.cpp | ||
| count2.fail.cpp | ||
| count3.fail.cpp | ||
| count_transparent.pass.cpp | 8 years ago | |
| equal_range.pass.cpp | ||
| equal_range0.pass.cpp | ||
| equal_range1.fail.cpp | ||
| equal_range2.fail.cpp | ||
| equal_range3.fail.cpp | ||
| equal_range_transparent.pass.cpp | 8 years ago | |
| find.pass.cpp | ||
| find0.pass.cpp | ||
| find1.fail.cpp | ||
| find2.fail.cpp | ||
| find3.fail.cpp | ||
| lower_bound.pass.cpp | ||
| lower_bound0.pass.cpp | ||
| lower_bound1.fail.cpp | ||
| lower_bound2.fail.cpp | ||
| lower_bound3.fail.cpp | ||
| upper_bound.pass.cpp | ||
| upper_bound0.pass.cpp | ||
| upper_bound1.fail.cpp | ||
| upper_bound2.fail.cpp | ||
| upper_bound3.fail.cpp | ||