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: ping?


chris wrote:

In my current tree I'm redoing the test suite additions to allow for keeping track of the number of assignments / swaps / checks / etc. performed on elements of a particular container, to allow for a more "system dependant" performance check (although obviously raw time is still the most important) which is made much easier by the iter_swap patch (as I can overload swap without feeling guilty, whereas overloading std::iter_swap is someone badly behaved),

Ok, thanks. An observation: looking at your preliminary testcases I noticed this kind of code:


iter_swap(vec_int.begin(), --vec_int.end());

Some time ago, Martin kindly explained to me privately, that --vec_int.end() strictly speaking
might be ill-formed: according to 3.10/5, vec_int.end() is an rvalue. Therefore, in libtsc++-v3
we can invoke operator--() on it only because our vector::iterator is of class type (3.10/10).


In my opinion, while elegantly improving the testsuite in this area we should try to avoid this
kind of dependency on implementation details.


Paolo.


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