I'll explain in an example:
template<typename T>
class Base{}
class A: public Base<A>{}
class foo(){
public:
template<typename T>
bool is_derived(){
/* static check if T is derived from Base<T> */
}
}
I found this trait to determine whether a class is a base of another.
My question is, how can I send template arguments to is_base_of from T if T is a pointer without specializing the boo template function?
I'd like to do something like this:
if T is a pointer then if (is_base_of<Base<*T>,*T>) return true;
if T is not a pointer then if (is_base_of<Base<T>,T>) return true;