Default initialization for vector-like containers

Complexity guarantees for associative container constructors and ordered input ranges
Added benchmark for associative containers
Fixes #9166

[SVN r85964]
This commit is contained in:
Ion Gaztañaga committed 2013-09-26 18:05:25 +00:00
1 parent 59b2793df7
commit 14f092ab00
39 files changed
+1450 -242

No files matched your search

+1 -1
View File
@@ -636,7 +636,7 @@ class flat_set
//!
//! <b>Complexity</b>: log(size())+count(k)
size_type count(const key_type& x) const
{ return m_flat_tree.find(x) == m_flat_tree.end() ? 0 : 1; }
{ return static_cast<size_type>(m_flat_tree.find(x) != m_flat_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.