|
Boost-Commit : |
From: philgarofalo_at_[hidden]
Date: 2007-12-30 13:12:14
Author: pgarofalo
Date: 2007-12-30 13:12:14 EST (Sun, 30 Dec 2007)
New Revision: 42374
URL: http://svn.boost.org/trac/boost/changeset/42374
Log:
Restored reverse_args. Useful after all.
Text files modified:
sandbox/boost/sequence_algo/combinatorial.hpp | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
Modified: sandbox/boost/sequence_algo/combinatorial.hpp
==============================================================================
--- sandbox/boost/sequence_algo/combinatorial.hpp (original)
+++ sandbox/boost/sequence_algo/combinatorial.hpp 2007-12-30 13:12:14 EST (Sun, 30 Dec 2007)
@@ -182,7 +182,7 @@
// find smallest element greater than *i after index i.
RandomAccessIterator k =
min_element_if(i + 1, last, comp,
- std::bind2nd(binary_reverse<Compare>(comp), *i));
+ std::bind2nd(reverse_args(comp), *i));
if (k == last) // Didn't find it.
if (i == first)
@@ -194,7 +194,7 @@
--i;
else
{
- std::swap(*i,* k);
+ std::swap(*i, *k);
std::partial_sort(i + 1, r, last, comp); // O(n lg n), heapsort
return true;
} // else
@@ -244,7 +244,7 @@
--i;
else
{
- std::swap(*i,* k);
+ std::swap(*i, *k);
std::partial_sort(i+1, r, last,
reverse_args(std::less<T>())); // O(n lg n), heapsort
return true;
@@ -280,16 +280,16 @@
if (i == first)
{
std::partial_sort(first, r, last,
- binary_reverse<Compare>(comp));
+ reverse_args(comp));
return false; // we're done--end of permutations
}
else
--i;
else
{
- std::swap(*i,* k);
+ std::swap(*i, *k);
std::partial_sort(i + 1, r, last,
- binary_reverse<Compare>(comp)); // O(n lg n), heapsort
+ reverse_args(comp)); // O(n lg n), heapsort
return true;
} // else
} // while
@@ -338,8 +338,8 @@
--i;
else
{
- std::swap(*i,* j);
- for(++i; i < r; i++)
+ std::swap(*i, *j);
+ for(++i; i < r; ++i)
{
// find smallest element greater than *(i - 1) after r - 1.
j = min_element_if(r, last,
@@ -377,7 +377,7 @@
// find smallest element greater than *i after r - 1.
RandomAccessIterator j =
min_element_if(r, last, comp,
- std::bind2nd(binary_reverse<Compare>(comp), *i));
+ std::bind2nd(reverse_args(comp), *i));
if (j == last)
if (i == first)
{
@@ -393,7 +393,7 @@
{
// find smallest element greater than *(i - 1) after r - 1.
j = min_element_if(r, last, comp,
- std::bind2nd(binary_reverse<Compare>(comp), *(i - 1)));
+ std::bind2nd(reverse_args(comp), *(i - 1)));
if (j != last)
std::swap(*i, *j);
} // for
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