forked from boostorg/algorithm
Compare commits
25 Commits
svn-branch
...
boost-1.39
Author | SHA1 | Date | |
---|---|---|---|
|
bcd24426ff | ||
|
2f2935f07e | ||
|
3cbaafc27f | ||
|
c067b348bf | ||
|
c33935fa1f | ||
|
98a8b08afb | ||
|
fc0f3dcffc | ||
|
822636418b | ||
|
352e16aade | ||
|
89c76ea1bb | ||
|
50b5726a6f | ||
|
d4b95734dd | ||
|
05af96f84c | ||
|
5bdbb2b308 | ||
|
1a02969303 | ||
|
6309379618 | ||
|
37581bac55 | ||
|
a71a4ed5b1 | ||
|
c509c3fbad | ||
|
d8683f2498 | ||
|
7c0101aa51 | ||
|
6f3e85528f | ||
|
8af639b7cf | ||
|
d9bc7e800b | ||
|
b4ed9beb90 |
@@ -171,7 +171,7 @@ namespace boost {
|
||||
// Check what kind of storage are we using right now
|
||||
if(use_fixed_storage(m_Size))
|
||||
{
|
||||
// Using fixed storage, allocate new
|
||||
// Using fixed storage, allocate new
|
||||
set_value_type* pTemp=new set_value_type[Other.m_Size];
|
||||
DestStorage=pTemp;
|
||||
m_Storage.m_dynSet=pTemp;
|
||||
|
@@ -54,23 +54,23 @@ void test(BOOST_EXPLICIT_TEMPLATE_TYPE(Value))
|
||||
less_count<Value> lc(counter);
|
||||
|
||||
// Test functionality
|
||||
tuple<Value const&, Value const&> result1 = boost::minmax(zero, one);
|
||||
tuple<Value const&, Value const&> result1 = minmax(zero, one);
|
||||
BOOST_CHECK_EQUAL( get<0>(result1), zero );
|
||||
BOOST_CHECK_EQUAL( get<1>(result1), one );
|
||||
|
||||
tuple<Value const&, Value const&> result2 = boost::minmax(one, zero);
|
||||
tuple<Value const&, Value const&> result2 = minmax(one, zero);
|
||||
BOOST_CHECK_EQUAL( get<0>(result2), zero );
|
||||
BOOST_CHECK_EQUAL( get<1>(result2), one );
|
||||
|
||||
// Test functionality and number of comparisons
|
||||
lc.reset();
|
||||
tuple<Value const&, Value const&> result3 = boost::minmax(zero, one, lc );
|
||||
tuple<Value const&, Value const&> result3 = minmax(zero, one, lc );
|
||||
BOOST_CHECK_EQUAL( get<0>(result3), zero );
|
||||
BOOST_CHECK_EQUAL( get<1>(result3), one );
|
||||
BOOST_CHECK_EQUAL( counter, 1 );
|
||||
|
||||
lc.reset();
|
||||
tuple<Value const&, Value const&> result4 = boost::minmax(one, zero, lc );
|
||||
tuple<Value const&, Value const&> result4 = minmax(one, zero, lc );
|
||||
BOOST_CHECK_EQUAL( get<0>(result4), zero );
|
||||
BOOST_CHECK_EQUAL( get<1>(result4), one );
|
||||
BOOST_CHECK_EQUAL( counter, 1);
|
||||
|
Reference in New Issue
Block a user