I have function template that implements storing POD into stream:
template<typename T>
void dumps(std::ostream &os, const T &t)
{
os.write(reinterpret_cast<const char *>(&t), sizeof(t));
}
Is there a way to specialize this template for containers to store container size and then call general implementation for container items?
Aucun commentaire:
Enregistrer un commentaire