
Gennaro Prota <gennaro_prota@yahoo.com> writes:
On Tue, 13 Apr 2004 15:08:35 +0200, "Pavel Vozenilek" <pavel_vozenilek@hotmail.com> wrote:
"Gennaro Prota" <gennaro_prota@yahoo.com> wrote
Hmm. Here's an extremely condensed (not exhaustive) summary of changes, future directions and open issues.
Off topic:
It isn't off topic, I guess :)
what is your opinion on being able to use negative indexes in operator[]?
Just for the case index == -1 or in general?
In general, this is a very useful idiom in Python. I'm not sure that C++ should adopt it, though, because it imposes a speed penalty for the normal case of indexing from the front (need to check for negative numbers). You don't pay for what you don't use and all that.
Like bs[-1] would return the last value stored? (Or with different syntax bs[boost.end - 1].)
That one is interesting because overload resolution can ensure that there's no speed penalty. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com