|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-06-21 15:58:39
Author: danieljames
Date: 2008-06-21 15:58:39 EDT (Sat, 21 Jun 2008)
New Revision: 46587
URL: http://svn.boost.org/trac/boost/changeset/46587
Log:
Get the test to pass when pair's default constructor creates two instances of
the member classes.
With some standard libraries I was getting two copies of the object after
creating a default pair, probably because it was creating an instance for its
default parameter. So only test after creating the pair object - since it isn't
our concern how many instances that creates.
Text files modified:
trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
Modified: trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/unnecessary_copy_tests.cpp 2008-06-21 15:58:39 EDT (Sat, 21 Jun 2008)
@@ -84,12 +84,11 @@
template <class T>
void unnecessary_copy_insert_test(T*)
{
- reset();
T x;
BOOST_DEDUCED_TYPENAME T::value_type a;
- COPY_COUNT(1);
+ reset();
x.insert(a);
- COPY_COUNT(2);
+ COPY_COUNT(1);
}
boost::unordered_set<count_copies>* set;
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