Add missing initializer list overload taking an additional allocator.

This commit is contained in:
Ion Gaztañaga committed 2015-02-28 23:46:08 +01:00
1 parent 8db0f4ad64
commit d39b1c143c
7 files changed
+136 -42

No files matched your search

+15 -5
View File
@@ -180,9 +180,16 @@ class flat_set
flat_set(std::initializer_list<value_type> il, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())
: base_t(true, il.begin(), il.end(), comp, a)
{
{}
}
//! <b>Effects</b>: Constructs an empty container using the specified
//! allocator, and inserts elements from the range [il.begin(), il.end()).
//!
//! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
//! comp and otherwise N logN, where N is il.begin() - il.end().
flat_set(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(true, il.begin(), il.end(), Compare(), a)
{}
//! <b>Effects</b>: Constructs an empty container using the specified comparison object and
//! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
@@ -197,9 +204,7 @@ class flat_set
flat_set(ordered_unique_range_t, std::initializer_list<value_type> il,
const Compare& comp = Compare(), const allocator_type& a = allocator_type())
: base_t(ordered_range, il.begin(), il.end(), comp, a)
{
}
{}
#endif
//! <b>Effects</b>: Copy constructs the container.
@@ -946,6 +951,11 @@ class flat_multiset
: base_t(false, il.begin(), il.end(), comp, a)
{}
//! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const allocator_type&)
flat_multiset(std::initializer_list<value_type> il, const allocator_type& a)
: base_t(false, il.begin(), il.end(), Compare(), a)
{}
//! @copydoc ::boost::container::flat_set::flat_set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare& comp, const allocator_type&)
flat_multiset(ordered_unique_range_t, std::initializer_list<value_type> il,
const Compare& comp = Compare(), const allocator_type& a = allocator_type())