mirror of
https://github.com/BlackMATov/flat.hpp.git
synced 2025-12-13 01:36:27 +07:00
add support for containers without ctor with allocator argument
This commit is contained in:
@@ -87,12 +87,14 @@ namespace flat_hpp
|
||||
std::is_same<typename container_type::allocator_type, allocator_type>::value,
|
||||
"Container::allocator_type must be same type as allocator_type");
|
||||
public:
|
||||
flat_map() = default;
|
||||
|
||||
explicit flat_map(
|
||||
const Allocator& a)
|
||||
: data_(a) {}
|
||||
|
||||
explicit flat_map(
|
||||
const Compare& c = Compare(),
|
||||
const Compare& c,
|
||||
const Allocator& a = Allocator())
|
||||
: data_(a)
|
||||
, compare_(c) {}
|
||||
|
||||
@@ -56,12 +56,14 @@ namespace flat_hpp
|
||||
std::is_same<typename container_type::allocator_type, allocator_type>::value,
|
||||
"Container::allocator_type must be same type as allocator_type");
|
||||
public:
|
||||
flat_set() = default;
|
||||
|
||||
explicit flat_set(
|
||||
const Allocator& a)
|
||||
: data_(a) {}
|
||||
|
||||
explicit flat_set(
|
||||
const Compare& c = Compare(),
|
||||
const Compare& c,
|
||||
const Allocator& a = Allocator())
|
||||
: data_(a)
|
||||
, compare_(c) {}
|
||||
|
||||
Reference in New Issue
Block a user