This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/48038] stable_sort problem with C++0x and comparator by value


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48038

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-09 09:42:25 UTC ---
(In reply to comment #0)
> 
> #ifdef BYVALUE
> inline bool operator<(V rh, V lh) {
> #else
>  inline bool operator<(V const& rh, V const& lh) {
> #endif
>   return rh.v[0]<lh.v[0];

Changing this to use vector::at() results in an out_of_range exception


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