http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58358
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> --- About the duplication, you may want to review what Francois posted to the mailing list a few days ago and send your comments. Personally, I agree it would be very nice to avoid the duplication, but at the same time when I discussed the topic with Howard a few years ago he explained that there are some tricky details, in particular vs proxy-iterators, we want to be really sure that nothing breaks vs those, the "natural" idea of using std::less & co doesn't work, a beefed up version is required (this is horrible IMHO, but we may have to live with it). Again, if you are interested, please have a look to that patch. Thanks!