forked from boostorg/container
Addd new constructors to containers, according to C++14's new constructors taking allocator arguments.
This commit is contained in:
1 parent
a7adc46a54
commit
22f1d32f7b
15 files changed
+349
-9
No files matched your search
@@ -229,10 +229,28 @@ class slist
|
||||
: AllocHolder(a)
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: Constructs a list
|
||||
//! and inserts n value-initialized value_types.
|
||||
//!
|
||||
//! <b>Throws</b>: If allocator_type's default constructor
|
||||
//! throws or T's default or copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to n.
|
||||
explicit slist(size_type n)
|
||||
: AllocHolder(allocator_type())
|
||||
{ this->resize(n); }
|
||||
|
||||
//! <b>Effects</b>: Constructs a list that will use a copy of allocator a
|
||||
//! and inserts n copies of value.
|
||||
//!
|
||||
//! <b>Throws</b>: If allocator_type's default constructor
|
||||
//! throws or T's default or copy constructor throws.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to n.
|
||||
slist(size_type n, const allocator_type &a)
|
||||
: AllocHolder(a)
|
||||
{ this->resize(n); }
|
||||
|
||||
//! <b>Effects</b>: Constructs a list that will use a copy of allocator a
|
||||
//! and inserts n copies of value.
|
||||
//!
|
||||
|
||||
Reference in new issue
Block a user