void foo (void *p); // library function; can't edit
template<typename T>
void Remove (T *p)
{
// main code
foo(p); // Can we remove const ness of T here ?
}
I have multiple functions like Remove()
, it can be called with const T*
also, which will not match with foo(void*)
. Without overloading/specializing Remove()
can I remove the const
ness of T*
? ... Usage:
const int *p;
Remove(p); // error related to `foo()`