D
daniel.w.gelder
Hello, I would like to write a function that accepts a reference to an
instance of a particular class, but will not accept instances of any
subclasses. For example:
struct A {};
struct B : A {};
inline void MyFunction(A& a) {}
A a;
B b;
MyFunction(a); // great!
MyFunction(b); // syntax error!
Is there a cheap way to do this?
Thanks.
Dan
instance of a particular class, but will not accept instances of any
subclasses. For example:
struct A {};
struct B : A {};
inline void MyFunction(A& a) {}
A a;
B b;
MyFunction(a); // great!
MyFunction(b); // syntax error!
Is there a cheap way to do this?
Thanks.
Dan