K
Kristofer Pettijohn
Greetings,
I'm trying to figure out if there is a way to determine whether a class
has the traits of another class...
For example...
I have a class called Square, which inherits Cube, which inherits Shape ..
I am writing another class that will get passed a class as a template
parameter...
MyNewClass<Square> object;
Inside of MyNewClass, is there a way to determine if the class passed to
it through the template is an object with the traits of Shape? I'd HOPE
to catch it at Compile-time, but run-time (using assert() perhaps?) would
be fine, too.
I hope I am asking this right..'tis a bit late.
Thanks for any help or pointers!
Kristofer
I'm trying to figure out if there is a way to determine whether a class
has the traits of another class...
For example...
I have a class called Square, which inherits Cube, which inherits Shape ..
I am writing another class that will get passed a class as a template
parameter...
MyNewClass<Square> object;
Inside of MyNewClass, is there a way to determine if the class passed to
it through the template is an object with the traits of Shape? I'd HOPE
to catch it at Compile-time, but run-time (using assert() perhaps?) would
be fine, too.
I hope I am asking this right..'tis a bit late.
Thanks for any help or pointers!
Kristofer