M
maynard
Is there a way to check if an object is an instance of a user-defined
type or an integral type? I have a templated class that this would be
very handy in (do _something_ if the template parameter is integral
type, or call a method of the template parameter if it is a
user-defined type/class).
I know this is quite error prone (e.g., instantiating the template
class with a class that doesn't define the required method), but this
is just for internal use (nothing distributed or production level).
Thanks in advance.
type or an integral type? I have a templated class that this would be
very handy in (do _something_ if the template parameter is integral
type, or call a method of the template parameter if it is a
user-defined type/class).
I know this is quite error prone (e.g., instantiating the template
class with a class that doesn't define the required method), but this
is just for internal use (nothing distributed or production level).
Thanks in advance.