This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] Remove algos code duplication
- From: Christopher Jefferson <chris at bubblescope dot net>
- 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: Mon, 26 Mar 2012 10:58:40 +0100
- Subject: Re: [v3] Remove algos code duplication
- References: <4F6F71F9.2050702@gmail.com>
On 25 Mar 2012, at 20:28, François Dumont wrote:
> Hi
>
> Here is a patch proposal to remove the duplication of the implementation details of many algos thanks to usage of lambdas in C++ 11 mode. This is what has been experimented in libstdcxx_so_7 branch but abandonned, lambdas are the real answer to this problem.
Why do you believe that lambdas are a better solution to this problem, as opposed to using a separate class (not std::less, but something like it?) I don't see any advantage to using a lambda, and I see several disadvantages.
Chris