Why doesn't iter_swap use swap?

Paolo Carlini pcarlini@suse.de
Mon Aug 23 21:56:00 GMT 2004


Martin Sebor wrote:

> The "new" iter_swap will also not work in cases where the two
> iterators' value_types are distinct types:
>
>     int i;
>     double d;
>     std::iter_swap (&i, &d);

Thanks Martin for pointing out this: I had briefly considered this 
"difficulty"
in the resolution, but unfortunately got distracted by other issues and 
couldn't
really spell it out.

> I would like to see the standard changed to either explicitly
> require that iter_swap's iterators' value_types be identical
> or the resolution of issue 187 reverted/changed so as not to
> force this new requirement.

Personally, I agree, but don't know which is the correct procedure in 
such cases,
that is when the DR is in the WP status?!? Is it still possible for the 
committee
to change the resolution or another DR must be opened??

Thanks,
Paolo.



More information about the Libstdc++ mailing list