Gustavo,

Why is the last key special? Why not a function to get the first or the
> penultimate key?
>

How would such a function look?


> Of course, there is one aspect where the first and last keys are special
> -- if you have some algorithm where you pop or shift the array
> successively. But in that case the argument about end() + key() having side
> effects is irrelevant because you are changing the array anyway.


How are you changing the array by getting the last (or first) key in this
method? Could you elaborate on that?

Anthony

Reply via email to