L
Lasse Skyum
Hi All,
Is it possible to detect (at compile-time) if an item is a basic type (int,
float, double,...) or an instance of a class/struct?
I'm thinking something like: (obviosly this isn't working...)
template<typename T>
CMyFileClass::Serialize(T &x)
{
#if IS_BASIC_TYPE(T)
// handle basic type
#else
// handle a class inherited from my CSerializable class
#endif
}
BTW, I'm writing serialization of data for a gameproject....
Thanks for any help!
Lasse
Is it possible to detect (at compile-time) if an item is a basic type (int,
float, double,...) or an instance of a class/struct?
I'm thinking something like: (obviosly this isn't working...)
template<typename T>
CMyFileClass::Serialize(T &x)
{
#if IS_BASIC_TYPE(T)
// handle basic type
#else
// handle a class inherited from my CSerializable class
#endif
}
BTW, I'm writing serialization of data for a gameproject....
Thanks for any help!
Lasse