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

@@ -274,6 +274,7 @@ class avltree_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
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(const node_ptr&,const node_ptr&,NodePtrCompare)