I think doing template specializations for the primitive types should do it