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:
Ion Gaztañaga committed 2013-09-26 21:35:57 +00:00
1 parent 11ba31a353
commit 254095432e
57 files changed
+1489 -281

No files matched your search

+6 -2
View File
@@ -11,7 +11,7 @@
#ifndef BOOST_CONTAINER_MAP_HPP
#define BOOST_CONTAINER_MAP_HPP
#if (defined _MSC_VER) && (_MSC_VER >= 1200)
#if defined(_MSC_VER)
# pragma once
#endif
@@ -170,6 +170,8 @@ class map
//! unique values.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
map( ordered_unique_range_t, InputIterator first, InputIterator last
, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
@@ -711,7 +713,7 @@ class map
//!
//! <b>Complexity</b>: log(size())+count(k)
size_type count(const key_type& x) const
{ return m_tree.find(x) == m_tree.end() ? 0 : 1; }
{ return static_cast<size_type>(m_tree.find(x) != m_tree.end()); }
//! <b>Returns</b>: An iterator pointing to the first element with key not less
//! than k, or a.end() if such an element is not found.
@@ -971,6 +973,8 @@ class multimap
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp = Compare(),
const allocator_type& a = allocator_type())