ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] [serialization] Error handling underdocumented?
by Vladimir Prus other posts by this author
Jan 14 2004 3:28PM messages near this date
[boost] Re: Userfriendly interaction of tuples with mpl containers | [boost] Userfriendly interaction of tuples with mpl containers
In a project of mine we plan to store some number of objects into an archive 
and later load them. The problem is that the number of objects is not known 
when you're writing an archive, so when reading, you don't know where to 
stop.

I wonder if the following code will work:

   ifstream ifs(...);
   boost::binary_iarchive ia(ifs);

   while(ifs) {
       some_object obj;
       ia > > obj;
       objects.push_back(obj);
   }

The problem is that I don't know what archive will do on stream errors. For 
the above to work, it should stop doing anything. But I can't find any 
documentation about what happens -- I think it's better to discuss and 
document that.

- Volodya







_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved