forked from boostorg/container
Default initialization for vector-like containers
Complexity guarantees for associative container constructors and ordered input ranges Fix for #9166 Added benchmark for associative containers Removed check for old MSVC compilers and #pragma once. [SVN r85970]
This commit is contained in:
1 parent
11ba31a353
commit
254095432e
57 files changed
+1489
-281
No files matched your search
@@ -10,7 +10,7 @@
|
||||
#ifndef BOOST_CONTAINER_STATIC_VECTOR_HPP
|
||||
#define BOOST_CONTAINER_STATIC_VECTOR_HPP
|
||||
|
||||
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
//! @pre <tt>count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Constructs a static_vector containing count default constructed Values.
|
||||
//! @brief Constructs a static_vector containing count value initialized values.
|
||||
//!
|
||||
//! @param count The number of values which will be contained in the container.
|
||||
//!
|
||||
@@ -151,6 +151,24 @@ public:
|
||||
: base_t(count)
|
||||
{}
|
||||
|
||||
//! @pre <tt>count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Constructs a static_vector containing count value initialized values.
|
||||
//!
|
||||
//! @param count The number of values which will be contained in the container.
|
||||
//!
|
||||
//! @par Throws
|
||||
//! If Value's default constructor throws.
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
//!
|
||||
//! @par Note
|
||||
//! Non-standard extension
|
||||
static_vector(size_type count, default_init_t)
|
||||
: base_t(count, default_init_t())
|
||||
{}
|
||||
|
||||
//! @pre <tt>count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Constructs a static_vector containing count copies of value.
|
||||
@@ -358,7 +376,7 @@ public:
|
||||
//! @pre <tt>count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts or erases elements at the end such that
|
||||
//! the size becomes count. New elements are default constructed.
|
||||
//! the size becomes count. New elements are value initialized.
|
||||
//!
|
||||
//! @param count The number of elements which will be stored in the container.
|
||||
//!
|
||||
@@ -369,6 +387,23 @@ public:
|
||||
//! Linear O(N).
|
||||
void resize(size_type count);
|
||||
|
||||
//! @pre <tt>count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts or erases elements at the end such that
|
||||
//! the size becomes count. New elements are default initialized.
|
||||
//!
|
||||
//! @param count The number of elements which will be stored in the container.
|
||||
//!
|
||||
//! @par Throws
|
||||
//! If Value's default constructor throws.
|
||||
//!
|
||||
//! @par Complexity
|
||||
//! Linear O(N).
|
||||
//!
|
||||
//! @par Note
|
||||
//! Non-standard extension
|
||||
void resize(size_type count, default_init_t);
|
||||
|
||||
//! @pre <tt>count <= capacity()</tt>
|
||||
//!
|
||||
//! @brief Inserts or erases elements at the end such that
|
||||
|
||||
Reference in new issue
Block a user