|
Boost : |
From: Hervé Brönnimann (hervebronnimann_at_[hidden])
Date: 2007-11-12 12:02:25
Ben, Giovanni: I've been giving some thought to this and I don't
think that I'd want to propose next_permutation(first, middle, last)
to the standard. It is easily achievable through next_combination
(first, middle, last) then going over all the permutations via
next_permutation(first, middle), in a loop. Granted, the order of
the permutations is a bit different that way, but frankly nobody
should care, the order is well specified (just not the lexicographic
order on the permutations, but the lexicographic order on the
underlying combination and if this combination is the same, the
lexicographic order of the permutations), and it makes the would-be
proposal a pure library extension -- so much easier to pass by the
committee.
Just a thought, HB
On Nov 12, 2007, at 5:50 AM, Ben Bear wrote:
>>> Another truth, it will exist a conflict between the
>>> gacap::next_permutation(first, middle, last) and
>>> std::next_permutation(first, last, comp).
>>> 2007/11/12, Giovanni Piero Deretta <gpderetta_at_[hidden]>:
>>
>> This might be solvable via concepts in C++0x (or even sfinae in C++03
>> by detecting iteratorness)
>>
>
> I see it, via concepts in C++0x. It will not be a problem in C++0x.
> _______________________________________________
> 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