C++ Lambda Mixer

Lambdas are delivering good and quick and simple C++. But , contrary to Functional Programming aficionados, you still need good old structs or classes. Here is the simple solution, with which you can achieve:

  • mixing lambdas into structure at run-time
  • polymorphic behavior without inheritance.

This solution is simple because it is not pathologically generic.  For different struct you will need to code different mixer. If you expect hundreds of mixers this is not for you.  Which, I very much doubt.

DBJ lambda mixer in action is here. (Wandbox). The code is also here:

Enjoy.  As ever, comments bellow please.