By changing the 'pass by value' to be a 'pass by const reference' (and adding some const qualifiers) the calculator can take any of the three types. Performance could be improved further using C++11 perfect forwarding to pass the function on without changing a thing. I added a comment to remind us of this. Also added a test for passing a function and a (commented out) test for passing a lambda.
PolyVox - The voxel management and manipulation library ======================================================= For installation instructions, please see INSTALL.txt
Description
Languages
C++
92.5%
CMake
3.4%
SWIG
2.2%
C
1%
Python
0.6%
Other
0.3%