Improved "count" for unique associative containers. Instead of calling tree's count just use find() != end() to avoid iterations as there is only one potential key.

Fixed some typos.
This commit is contained in:
Ion Gaztañaga
2014-01-19 14:28:57 +01:00
parent caee07a643
commit 3c6f96a96a
21 changed files with 324 additions and 416 deletions

View File

@@ -248,6 +248,7 @@ class treap_algorithms
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
template<class KeyType, class KeyNodePtrCompare>
static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Requires</b>: "h" must be the header node of a tree.