Forum Navigation
generic toUtfx / formatting possible?
Posted: 06/17/07 09:56:21I have a templated class which needs some printing/serialization routines. But it's base types can be classes (which have their toUtfx routines) or basic integer types like int or long. Is there a way to use printing functions for those base types in a generic way?
obj.toUtf8();complains: "Error: no property 'toUtf8' for type 'int'" if I instantiate this template class for int. Or is there at least a way to determine (via static if maybe?), if the type is a class or native data type?