mirror of
https://github.com/BlackMATov/flat.hpp.git
synced 2025-12-15 10:16:20 +07:00
remove Allocator template param
This commit is contained in:
@@ -119,16 +119,16 @@ TEST_CASE("flat_map") {
|
||||
int,
|
||||
unsigned,
|
||||
std::less<int>,
|
||||
alloc_t>;
|
||||
std::vector<std::pair<int,unsigned>, alloc_t>>;
|
||||
|
||||
using map2_t = flat_map<
|
||||
int,
|
||||
unsigned,
|
||||
std::greater<int>,
|
||||
alloc_t>;
|
||||
std::vector<std::pair<int,unsigned>, alloc_t>>;
|
||||
|
||||
using vec_t = std::vector<
|
||||
std::pair<int,unsigned>>;
|
||||
std::pair<int,unsigned>, alloc_t>;
|
||||
|
||||
{
|
||||
auto s0 = map_t();
|
||||
@@ -162,13 +162,6 @@ TEST_CASE("flat_map") {
|
||||
REQUIRE(vec_t(s3.begin(), s3.end()) == vec_t({{0,1},{1,2}}));
|
||||
}
|
||||
|
||||
{
|
||||
auto s0 = map_t();
|
||||
auto s1 = map_t(alloc_t(42));
|
||||
REQUIRE(s0.get_allocator().i == 0);
|
||||
REQUIRE(s1.get_allocator().i == 42);
|
||||
}
|
||||
|
||||
{
|
||||
auto s0 = map_t{{0,1}, {1,2}};
|
||||
auto s1 = s0;
|
||||
@@ -179,8 +172,6 @@ TEST_CASE("flat_map") {
|
||||
REQUIRE(s2 == map_t{{0,1}, {1,2}});
|
||||
auto s3 = map_t(s2, alloc_t(42));
|
||||
REQUIRE(s2 == s3);
|
||||
REQUIRE(s2.get_allocator().i == 0);
|
||||
REQUIRE(s3.get_allocator().i == 42);
|
||||
auto s4 = map_t(std::move(s3), alloc_t(21));
|
||||
REQUIRE(s3.empty());
|
||||
REQUIRE(s4 == map_t{{0,1}, {1,2}});
|
||||
@@ -251,7 +242,6 @@ TEST_CASE("flat_map") {
|
||||
int,
|
||||
unsigned,
|
||||
std::less<int>,
|
||||
alloc2_t,
|
||||
std::deque<std::pair<int, unsigned>, alloc2_t>>;
|
||||
|
||||
map2_t s1;
|
||||
|
||||
Reference in New Issue
Block a user