I am trying to create smart pointer to my function.
I have the function:
double returnValue(int i){
return i;
}
Its pretty simple to create raw pointer:
double (*somePTR)(int) = &returnValue;
But how to make smart pointer to the function, for example shared_ptr?
auto someptr = std::make_shared<double>(&returnValue);
I have tried a lot of of options, but nothing works.