add insert sorted ranges optimization #23

This commit is contained in:
2019-05-31 07:19:53 +07:00
parent 5b67609aab
commit 8104ebd598
11 changed files with 501 additions and 0 deletions

View File

@@ -326,6 +326,16 @@ TEST_CASE("flat_set") {
s0.insert({9,7,3,5,5});
REQUIRE(s0 == set_t{2,3,4,5,6,7,9});
}
{
set_t s0;
s0.insert(sorted_unique_range, {1,2,3});
REQUIRE(s0 == set_t{1,2,3});
set_t s1;
s1.insert(sorted_range, {1,2,2,3});
REQUIRE(s1 == set_t{1,2,3});
}
}
SECTION("erasers") {
using set_t = flat_set<int>;