Fixes complexity of map insert_or_assign with a hint.
authorMark de Wever <koraq@xs4all.nl>
Sat, 19 Sep 2020 13:39:09 +0000 (15:39 +0200)
committerMark de Wever <koraq@xs4all.nl>
Sat, 19 Sep 2020 14:28:55 +0000 (16:28 +0200)
commitd4dd961300588ce7e50625a1947befb45e3a0c42
tree3c1342d44b5cc32efaddc43a6d1550e913bddc7d
parent2819cea2ef8aab9d7ef8ba29feec9cb58cc942f6
Fixes complexity of map insert_or_assign with a hint.

Mitsuru Kariya reported the map operations insert_or_assign with a hint
violates the complexity requirement. The function no longer uses a lower_bound,
which caused the wrong complexity.

Fixes PR38722: [C++17] std::map::insert_or_assign w/ hint violate complexity requirements

Differential Revision: https://reviews.llvm.org/D62779
libcxx/include/__tree
libcxx/include/map
libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp