[SVN r85297]
This commit is contained in:
Ion Gaztañaga
2013-08-10 22:58:27 +00:00
parent db9dfed107
commit d91dc0059b
3 changed files with 23 additions and 10 deletions

View File

@@ -375,7 +375,8 @@ and erasure times considerably. Flat associative containers have the following
attributes: attributes:
* Faster lookup than standard associative containers * Faster lookup than standard associative containers
* Much faster iteration than standard associative containers * Much faster iteration than standard associative containers.
Random-access iterators instead of bidirectional iterators.
* Less memory consumption for small objects (and for big objects if `shrink_to_fit` is used) * Less memory consumption for small objects (and for big objects if `shrink_to_fit` is used)
* Improved cache performance (data is stored in contiguous memory) * Improved cache performance (data is stored in contiguous memory)
* Non-stable iterators (iterators are invalidated when inserting and erasing elements) * Non-stable iterators (iterators are invalidated when inserting and erasing elements)

View File

@@ -84,8 +84,10 @@ static D force_copy(S s)
//! This means that inserting a new element into a flat_map invalidates //! This means that inserting a new element into a flat_map invalidates
//! previous iterators and references //! previous iterators and references
//! //!
//! Erasing an element of a flat_map invalidates iterators and references //! Erasing an element invalidates iterators and references
//! pointing to elements that come after (their keys are bigger) the erased element. //! pointing to elements that come after (their keys are bigger) the erased element.
//!
//! This container provides random-access iterators.
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
template <class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator< std::pair< Key, T> > > template <class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator< std::pair< Key, T> > >
#else #else
@@ -947,6 +949,15 @@ inline bool operator<(const flat_multimap<Key,T,Compare,Allocator>& x,
//! //!
//! Allocator is the allocator to allocate the value_types //! Allocator is the allocator to allocate the value_types
//! (e.g. <i>allocator< std::pair<Key, T> ></i>). //! (e.g. <i>allocator< std::pair<Key, T> ></i>).
//!
//! flat_multimap is similar to std::multimap but it's implemented like an ordered vector.
//! This means that inserting a new element into a flat_map invalidates
//! previous iterators and references
//!
//! Erasing an element invalidates iterators and references
//! pointing to elements that come after (their keys are bigger) the erased element.
//!
//! This container provides random-access iterators.
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
template <class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator< std::pair< Key, T> > > template <class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator< std::pair< Key, T> > >
#else #else

View File

@@ -51,9 +51,7 @@ inline bool operator<(const flat_set<Key,Compare,Allocator>& x,
/// @endcond /// @endcond
//! flat_set is a Sorted Associative Container that stores objects of type Key. //! flat_set is a Sorted Associative Container that stores objects of type Key.
//! flat_set is a Simple Associative Container, meaning that its value type, //! It is also a Unique Associative Container, meaning that no two elements are the same.
//! as well as its key type, is Key. It is also a Unique Associative Container,
//! meaning that no two elements are the same.
//! //!
//! flat_set is similar to std::set but it's implemented like an ordered vector. //! flat_set is similar to std::set but it's implemented like an ordered vector.
//! This means that inserting a new element into a flat_set invalidates //! This means that inserting a new element into a flat_set invalidates
@@ -61,6 +59,8 @@ inline bool operator<(const flat_set<Key,Compare,Allocator>& x,
//! //!
//! Erasing an element of a flat_set invalidates iterators and references //! Erasing an element of a flat_set invalidates iterators and references
//! pointing to elements that come after (their keys are bigger) the erased element. //! pointing to elements that come after (their keys are bigger) the erased element.
//!
//! This container provides random-access iterators.
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
template <class Key, class Compare = std::less<Key>, class Allocator = std::allocator<Key> > template <class Key, class Compare = std::less<Key>, class Allocator = std::allocator<Key> >
#else #else
@@ -763,16 +763,17 @@ inline bool operator<(const flat_multiset<Key,Compare,Allocator>& x,
/// @endcond /// @endcond
//! flat_multiset is a Sorted Associative Container that stores objects of type Key. //! flat_multiset is a Sorted Associative Container that stores objects of type Key.
//! flat_multiset is a Simple Associative Container, meaning that its value type, //!
//! as well as its key type, is Key. //! flat_multiset can store multiple copies of the same key value.
//! flat_Multiset can store multiple copies of the same key value.
//! //!
//! flat_multiset is similar to std::multiset but it's implemented like an ordered vector. //! flat_multiset is similar to std::multiset but it's implemented like an ordered vector.
//! This means that inserting a new element into a flat_multiset invalidates //! This means that inserting a new element into a flat_multiset invalidates
//! previous iterators and references //! previous iterators and references
//! //!
//! Erasing an element of a flat_multiset invalidates iterators and references //! Erasing an element invalidates iterators and references
//! pointing to elements that come after (their keys are equal or bigger) the erased element. //! pointing to elements that come after (their keys are bigger) the erased element.
//!
//! This container provides random-access iterators.
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
template <class Key, class Compare = std::less<Key>, class Allocator = std::allocator<Key> > template <class Key, class Compare = std::less<Key>, class Allocator = std::allocator<Key> >
#else #else