This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] tr1::array fixups


Benjamin Kosnik wrote:

const_iterator end() const
! { return reinterpret_cast<iterator>(&_M_instance[_S_index - 1]); }


By the way, a few days ago, I have noticed that end() - beg() == size() - 1 != size(),
I think this is not ok: end() should point one-past-end, as always happens with the
other containers...


Wouldn't be better just using (_M_instance + _S_index) ??

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]