SERIALISATION_INLINE StreamWriter::StreamWriter(std::fstream &stream) : mStream(&stream) { assert((stream.flags() & std::ios::out) && "Not an input stream"); assert((stream.flags() & std::ios::binary) && "File stream is not in binary mode"); }