lundi 13 avril 2015

C++ Nested Lambda

I am working on a data aggregator implementation with nested lambda expressions. I am not very experienced with lambda functions yet and I am not 100% sure whether my implementation idea is implementable.


The Problem: I have a Multivalue class which has a vector as a private member. The data type of this private vector can be defined via a template parameter of the Multivalue class. I want to offer different aggregation functions (sum, harmonic mean, average, ...) for the data in the vector. BUT: if the vector data type is a tuple, the aggregation functions should also be available for the components of the tuple. The following link shows my first try, which is not working yet. I hope someone can explain to me what the problem is. I think there is a problem with the nested lambda expressions, I use:


http://goo.gl/w7MUAi


Moo


Aucun commentaire:

Enregistrer un commentaire