
10 Jun
2008
10 Jun
'08
8:30 a.m.
Hi,
The following code does not throw archive_exception always:
std::stringstream ss; boost::archive::text_iarchive ia(ss);
Note that the above code is not correct usage of the library and shuold through some some sort of error or exception.
I haven't found any line in the documentation that puts a precondition on the stream. What are the preconditions though? Even the stream content is valid there is always a possibility of failure when read. The text_iarchive constructor does not check that leaving a big chance of unexpected exception or even program crash. Thanks, Gancho Manev