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 committed 2014-01-19 14:28:57 +01:00
1 parent caee07a643
commit 3c6f96a96a
21 files changed
+324 -416

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ void test_common_unordered_and_associative_container(Container & c, Data & d, bo
c.erase(*da, c.key_comp());
BOOST_TEST( c.size() == old_size-1 );
//This should not eras anyone
//This should not erase any
size_type second_erase = c.erase_and_dispose( *da, c.key_comp(), detail::null_disposer() );
BOOST_TEST( second_erase == 0 );