From ebd75b401079f1e5151390550951885359587682 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 21 Jun 2008 19:58:39 +0000 Subject: [PATCH] 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. [SVN r46587] --- test/unordered/unnecessary_copy_tests.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/unordered/unnecessary_copy_tests.cpp b/test/unordered/unnecessary_copy_tests.cpp index 87e6d158..18d36525 100644 --- a/test/unordered/unnecessary_copy_tests.cpp +++ b/test/unordered/unnecessary_copy_tests.cpp @@ -84,12 +84,11 @@ namespace unnecessary_copy_tests template 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* set;