|
Boost : |
From: Ben Bear (benbearchen_at_[hidden])
Date: 2007-11-13 22:51:34
I have found it:-)
Well, your next_permutation(first, last, first_value, last_value)
should have a little change, like this:
template <class BidirectionalIterator, class T>
bool
next_permutation(BidirectionalIterator first,
BidirectionalIterator last,
T first_value, T last_value)
{
while (last != first) {
if (++(*(--last)) == last_value) {
*last = first_value;
}
else {
return true;
}
}
return last != first;
}
2007/11/14, Hervé Brönnimann <hervebronnimann_at_[hidden]>:
>
> On Nov 13, 2007, at 10:19 PM, Ben Bear wrote:
> >
> > I'm sorry. I clicked the `combination.hpp' link, but it returned "404
> > Not Found". I thought you would put it later...
> > `combination_ex.cpp' is also "Not Found"
>
> Well, I didn't write the examples... But the link to hpp, the first
> line of the web page, where it says:
> Header <boost/algorithm/combination.hpp>
> works... I'm sorry that not all links to combination.hpp were
> corrected. In any case, the link is:
> http://photon.poly.edu/~hbr/boost/combination.hpp
>
> Cheers,
> --
> Hervé Brönnimann
> hervebronnimann_at_[hidden]
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk