I need to create a lambda function that can take in either a int * or a float *, e.g., something like
auto func = [](void* ptr) {
// do some assignments with the pointer
}
Currently, I am using the void * approach, but I'm wondering what are some other approaches to accomplish what I want?
I don't have access to C++17 features in my codebase so will have to stick to C++14 or lower semantics.