add extended copy ctors

This commit is contained in:
2019-05-07 01:47:20 +07:00
parent dab7140405
commit 06d4916d46
4 changed files with 30 additions and 0 deletions

View File

@@ -135,6 +135,14 @@ namespace flat_hpp
insert(ilist);
}
flat_map(flat_map&& other, const Allocator& a)
: data_(std::move(other.data_), a)
, compare_(std::move(other.compare_)) {}
flat_map(const flat_map& other, const Allocator& a)
: data_(other.data_, a)
, compare_(other.compare_) {}
flat_map(flat_map&& other) = default;
flat_map(const flat_map& other) = default;

View File

@@ -104,6 +104,14 @@ namespace flat_hpp
insert(ilist);
}
flat_set(flat_set&& other, const Allocator& a)
: data_(std::move(other.data_), a)
, compare_(std::move(other.compare_)) {}
flat_set(const flat_set& other, const Allocator& a)
: data_(other.data_, a)
, compare_(other.compare_) {}
flat_set(flat_set&& other) = default;
flat_set(const flat_set& other) = default;