|
Boost : |
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-10-26 11:41:59
"Russell Hind" wrote:
> There seems to be a problem on win32 where if you use a stream opened in
> text mode for a binary archive, you get errors.
>
> I realise you shouldn't use a binary archive with a text stream, but is
> there anyway to catch this at compile or run time? Otherwise you just
> end up with a corrupted archive?
>
Probably no way to find stream is text or binary.
Maybe if serialization library inserts '\n' at the opening
and asks for tellp() to check how many bytes are in.
/Pavel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk