|
From: | Rodney Sparapani |
Subject: | Re: [Help-gsl] Lambda functions, member functions, and C++ |
Date: | Fri, 28 Oct 2011 13:33:24 -0500 |
User-agent: | Thunderbird 2.0.0.24 (X11/20110927) |
Andrew W. Steiner wrote:
Hello all, Does anyone know if the lambda function support in gcc 4.5 and later might allow one to create a lambda function from a member function in C++ and then pass that lambda function as a C-style to a GSL function pointer? One of the reasons I originally created my C++ library, O2scl [1], based in part on GSL, was because it was very difficult to use GSL with member functions [2]. However, I was wondering if the new lambda function support in gcc might alleviate that problem. Take care, Andrew
Hi Andrew: I haven't kept up with recent C++ changes. But, it seems to me it's a bad idea to require a specific feature like that. Then, you may be stuck if you are not using GCC 4.5 or a similarly advanced C++ compiler. This kind of thing comes up all the time with C++ libraries like Boost, etc. And, it is very annoying because there may be a very good reason that you are using an older C++ compiler; usually because upgrading is not convenient without upgrading your OS or something like that. Beyond that, this is the first time that I carefully looked at O2scl. And, it looks pretty well done! I'd encourage anybody who is still limping along with one of the GSLwrap variants to abandon it in favor of O2scl (and that goes for me included). Rodney
[Prev in Thread] | Current Thread | [Next in Thread] |