For this you have provided foreach function.
And this
how you are actually passing data to (genericPointAction action)using genericPointAction = std::function<void (const CCVector3 &, ScalarType &)>
OR
void (const CCVector3 &, ScalarType &)
this type of prototype is not defined or declared in library..
So how to exactly use this function in order to fill point cloud in "GenericIndexedCloudPersist" type.