|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50544 - trunk/boost/archive/impl
From: ramey_at_[hidden]
Date: 2009-01-12 01:18:57
Author: ramey
Date: 2009-01-12 01:18:57 EST (Mon, 12 Jan 2009)
New Revision: 50544
URL: http://svn.boost.org/trac/boost/changeset/50544
Log:
destructors can't throw !
Text files modified:
trunk/boost/archive/impl/basic_binary_iprimitive.ipp | 13 +++++--------
trunk/boost/archive/impl/basic_binary_oprimitive.ipp | 13 +++++--------
2 files changed, 10 insertions(+), 16 deletions(-)
Modified: trunk/boost/archive/impl/basic_binary_iprimitive.ipp
==============================================================================
--- trunk/boost/archive/impl/basic_binary_iprimitive.ipp (original)
+++ trunk/boost/archive/impl/basic_binary_iprimitive.ipp 2009-01-12 01:18:57 EST (Mon, 12 Jan 2009)
@@ -182,15 +182,12 @@
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_iprimitive<Archive, Elem, Tr>::~basic_binary_iprimitive(){
// push back unread characters
- int result = static_cast<detail::input_streambuf_access<Elem, Tr> &>(
- m_sb
- ).sync();
//destructor can't throw !
- //if(0 != result){
- // boost::serialization::throw_exception(
- // archive_exception(archive_exception::stream_error)
- // );
- //}
+ try{
+ static_cast<detail::input_streambuf_access<Elem, Tr> &>(m_sb).sync();
+ }
+ catch(...){
+ }
}
} // namespace archive
Modified: trunk/boost/archive/impl/basic_binary_oprimitive.ipp
==============================================================================
--- trunk/boost/archive/impl/basic_binary_oprimitive.ipp (original)
+++ trunk/boost/archive/impl/basic_binary_oprimitive.ipp 2009-01-12 01:18:57 EST (Mon, 12 Jan 2009)
@@ -152,15 +152,12 @@
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_oprimitive<Archive, Elem, Tr>::~basic_binary_oprimitive(){
// flush buffer
- int result = static_cast<detail::output_streambuf_access<Elem, Tr> &>(
- m_sb
- ).sync();
//destructor can't throw
- //if(0 != result){
- // boost::serialization::throw_exception(
- // archive_exception(archive_exception::stream_error)
- // );
- //}
+ try{
+ static_cast<detail::output_streambuf_access<Elem, Tr> &>(m_sb).sync();
+ }
+ catch(...){
+ }
}
} // namespace archive
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk