Ticket #8165: basic_text_iprimitive.diff

File basic_text_iprimitive.diff, 2.0 KB (added by Louis Dionne, 10 years ago)

Patch for the described issue.

  • boost/archive/basic_text_iprimitive.hpp

     
    99/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
    1010// basic_text_iprimitive.hpp
    1111
    12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
     12// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
    1313// Use, modification and distribution is subject to the Boost Software
    1414// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    1515// http://www.boost.org/LICENSE_1_0.txt)
     
    3030
    3131#include <boost/config.hpp>
    3232#if defined(BOOST_NO_STDC_NAMESPACE)
    33 namespace std{ 
    34     using ::size_t; 
     33namespace std{
     34    using ::size_t;
    3535    #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
    3636        using ::locale;
    3737    #endif
     
    7878    #ifndef BOOST_NO_STD_LOCALE
    7979    boost::scoped_ptr<std::locale> archive_locale;
    8080    basic_streambuf_locale_saver<
    81         BOOST_DEDUCED_TYPENAME IStream::char_type, 
     81        BOOST_DEDUCED_TYPENAME IStream::char_type,
    8282        BOOST_DEDUCED_TYPENAME IStream::traits_type
    8383    > locale_saver;
    8484    #endif
     
    8686    template<class T>
    8787    void load(T & t)
    8888    {
    89         if(! is.fail()){
    90             is >> t;
     89        if (is >> t)
    9190            return;
    92         }
    9391        boost::serialization::throw_exception(
    9492            archive_exception(archive_exception::input_stream_error)
    9593        );
     
    123121        t = i;
    124122    }
    125123    #endif
    126     BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) 
     124    BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
    127125    basic_text_iprimitive(IStream  &is, bool no_codecvt);
    128     BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) 
     126    BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
    129127    ~basic_text_iprimitive();
    130128public:
    131129    BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)