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: Remove algo duplication


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


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