|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56461 - in trunk: boost/unordered/detail libs/unordered/test/unordered
From: daniel_james_at_[hidden]
Date: 2009-09-28 19:06:04
Author: danieljames
Date: 2009-09-28 19:06:03 EDT (Mon, 28 Sep 2009)
New Revision: 56461
URL: http://svn.boost.org/trac/boost/changeset/56461
Log:
Remove the optimization for std::pair with a key reference. It'll be too much hassle to get a very unusual use case to work on all compilers.
Text files modified:
trunk/boost/unordered/detail/extract_key.hpp | 14 --------------
trunk/libs/unordered/test/unordered/insert_range_tests.cpp | 5 +++--
2 files changed, 3 insertions(+), 16 deletions(-)
Modified: trunk/boost/unordered/detail/extract_key.hpp
==============================================================================
--- trunk/boost/unordered/detail/extract_key.hpp (original)
+++ trunk/boost/unordered/detail/extract_key.hpp 2009-09-28 19:06:03 EDT (Mon, 28 Sep 2009)
@@ -107,20 +107,6 @@
return v.first;
}
- template <class Second>
- static key_type const& extract(
- std::pair<key_type&, Second> const& v)
- {
- return v.first;
- }
-
- template <class Second>
- static key_type const& extract(
- std::pair<key_type const&, Second> const& v)
- {
- return v.first;
- }
-
#if defined(BOOST_UNORDERED_STD_FORWARD)
template <class Arg1, class... Args>
static key_type const& extract(key_type const& k,
Modified: trunk/libs/unordered/test/unordered/insert_range_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/insert_range_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/insert_range_tests.cpp 2009-09-28 19:06:03 EDT (Mon, 28 Sep 2009)
@@ -29,12 +29,13 @@
test::object_count count = test::global_object_count;
dst.emplace(src);
- BOOST_TEST(test::global_object_count.instances == count.instances + 1);
+ BOOST_TEST_EQ(test::global_object_count.instances, count.instances + 1);
BOOST_TEST_EQ(test::global_object_count.constructions, count.constructions + 1);
count = test::global_object_count;
dst.emplace(src);
- BOOST_TEST_EQ(test::global_object_count, count);
+ BOOST_TEST_EQ(test::global_object_count.instances, count.instances);
+ BOOST_TEST(test::global_object_count.constructions <= count.constructions + 1);
}
RUN_TESTS()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk