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]
This commit is contained in:
Daniel James
2008-06-21 19:58:39 +00:00
parent 9bd3f498a7
commit ebd75b4010

View File

@ -84,12 +84,11 @@ namespace unnecessary_copy_tests
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;