This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] First bits of the algo merge
Paolo Carlini wrote:
> Howard Hinnant wrote:
>
>
>> The demo is set up with an example which breaks under A, but not
>> under B and C.
>>
>
> ARRGGHH!!! You cannot say that so quickly!
>
> You mean, committing the current simple version of the algo
> simplification, would break some code that currently is fine in
> mainline! This is TOTALLY bad.
>
>
This proxy iterator is already broken in a bunch of other algorithms
(for example, you can't use it with std::search, std::search_n,
std::remove, really anything which delegates to another algorithm, in
these cases std::find).
Of course, perhaps those other things should be fixed. We wouldn't
however be breaking things that are already generally supported. Also,
fixing the algorithm isn't hard (shove a const on the conversion, and a
mutable on the counter).
Out of interest Howard, do you know vaguely which other compilers
support these kinds of things?
Chris