Re: std::iter_swap and proxies
"Mycroft Holmes" <m.holmes@nospam.it> wrote in message
news:u9ajD0U3JHA.1420@TK2MSFTNGP04.phx.gbl
"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:OC93rYU3JHA.140@TK2MSFTNGP03.phx.gbl...
This is an oxymoron. STL-compliant containers cannot have iterators
on bits. In particular, vector<bool> does not meet container
requirements. ... because i is not a forward iterator. See 24.1.3
table 74, which requires that *i return a T&, where T is the
value_type of the iterator.
Thanks for the links; yes, I know the requirements, however I was just
pointing out that it's *possible* for
an stl implementation to work even when requirements are not strictly
satisfied (it can be by mere chance, but gcc stl does work correctly
in our case).
It may be possible, but it's not required. What better illustration than
discovering that your non-portable code does not, in fact, port?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925