Boost logo

Boost Users :

From: Gancho Manev (gmanev_at_[hidden])
Date: 2008-06-10 04:30:57

>> 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.

Gancho Manev

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at