Index: boost/archive/basic_text_iprimitive.hpp =================================================================== --- boost/archive/basic_text_iprimitive.hpp (révision 83141) +++ boost/archive/basic_text_iprimitive.hpp (copie de travail) @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_iprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -30,8 +30,8 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) using ::locale; #endif @@ -78,7 +78,7 @@ #ifndef BOOST_NO_STD_LOCALE boost::scoped_ptr archive_locale; basic_streambuf_locale_saver< - BOOST_DEDUCED_TYPENAME IStream::char_type, + BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type > locale_saver; #endif @@ -86,10 +86,8 @@ template void load(T & t) { - if(! is.fail()){ - is >> t; + if (is >> t) return; - } boost::serialization::throw_exception( archive_exception(archive_exception::input_stream_error) ); @@ -123,9 +121,9 @@ t = i; } #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_iprimitive(IStream &is, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~basic_text_iprimitive(); public: BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)