This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Remove algo duplication
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 8 Sep 2013 16:33:04 +0200 (CEST)
- Subject: Re: Remove algo duplication
- Authentication-results: sourceware.org; auth=none
- References: <52264074 dot 2050502 at gmail dot com>
- Reply-to: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
On Tue, 3 Sep 2013, François Dumont wrote:
I still have this patch pending on my side, I don't think we ever really
decided what to do with it. In this version of the patch everything not
Standard has been moved to the std::__detail namespace for a cleaner design.
Argh, that makes the patch much harder to read (irrelevant __detail
changes all over the place), in the future please avoid mixing things.
+ template<typename _Iterator1, typename _Iterator2 = _Iterator1>
+ struct _Iter_less_iter
+ {
+ bool
+ operator()(_Iterator1 __it1, _Iterator2 __it2)
+ { return *__it1 < *__it2; }
+ };
I don't remember if we already discussed it, but why not this instead?
+ struct _Iter_less_iter
+ {
+ template<typename _Iterator1, typename _Iterator2>
+ bool
+ operator()(_Iterator1 __it1, _Iterator2 __it2) const
+ { return *__it1 < *__it2; }
+ };
--
Marc Glisse