iter_swapping vector<bool>::iterator..
Theodore Papadopoulo
Theodore.Papadopoulo@sophia.inria.fr
Fri Mar 18 19:00:00 GMT 2005
On Fri, 2005-03-18 at 17:39 +0100, Paolo Carlini wrote:
> Chris Jefferson wrote:
>
> > (Just thought I'd answer this bit.. but please answer if you have any
> > knowledge in this area, the whole iterator / vector<bool> / swap
> > business just confuses me..)
> >
> > I don't think we can fix this with the implementation, looking at
> > 23.2.5, the "reference" type has to be a class rather than a reference,
> > defined like:
>
> [snip]
>
> Ok, thanks, personally I'm becoming convinced that indeed we can't.
Isn't it just possible to add a specific version of swap:
void swap(std::_Bit_reference,std::_Bit_reference);
At least this could be a temporary fix (disregarding ABI issues)...
OK, this is one of these evil extensions that are better avoided...
More information about the Libstdc++
mailing list