|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-05-28 06:58:42
Author: danieljames
Date: 2008-05-28 06:58:42 EDT (Wed, 28 May 2008)
New Revision: 45864
URL: http://svn.boost.org/trac/boost/changeset/45864
Log:
Make it possible to pass the unordered move tests without rvalue references - although compilers still require good return value optimisation.
Text files modified:
trunk/libs/unordered/test/unordered/move_tests.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Modified: trunk/libs/unordered/test/unordered/move_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/move_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/move_tests.cpp 2008-05-28 06:58:42 EDT (Wed, 28 May 2008)
@@ -125,7 +125,13 @@
{
test::random_values<T> v(25);
T y(create(v, count, hf, eq, al, 1.0), al);
+#if defined(BOOST_HAS_RVALUE_REFS)
BOOST_CHECK(count == test::global_object_count);
+#else
+ BOOST_CHECK(test::global_object_count.constructions - count.constructions <=
+ test::is_map<T>::value ? 50 : 25);
+ BOOST_CHECK(count.instances == test::global_object_count.instances);
+#endif
test::check_container(y, v);
BOOST_CHECK(test::equivalent(y.hash_function(), hf));
BOOST_CHECK(test::equivalent(y.key_eq(), eq));
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