comparison DEPENDENCIES/generic/include/boost/archive/basic_text_iprimitive.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
1 #ifndef BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP 1 #ifndef BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP
2 #define BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP 2 #define BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP
3 3
4 // MS compatible compilers support #pragma once 4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 5 #if defined(_MSC_VER)
6 # pragma once 6 # pragma once
7 #endif 7 #endif
8 8
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // basic_text_iprimitive.hpp 10 // basic_text_iprimitive.hpp
62 #pragma warning( push ) 62 #pragma warning( push )
63 #pragma warning( disable : 4244 4267 ) 63 #pragma warning( disable : 4244 4267 )
64 #endif 64 #endif
65 65
66 template<class IStream> 66 template<class IStream>
67 class basic_text_iprimitive 67 class basic_text_iprimitive {
68 {
69 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
70 protected: 68 protected:
71 #else
72 public:
73 #endif
74 IStream &is; 69 IStream &is;
75 io::ios_flags_saver flags_saver; 70 io::ios_flags_saver flags_saver;
76 io::ios_precision_saver precision_saver; 71 io::ios_precision_saver precision_saver;
77 72
78 #ifndef BOOST_NO_STD_LOCALE 73 #ifndef BOOST_NO_STD_LOCALE
79 boost::scoped_ptr<std::locale> archive_locale; 74 boost::scoped_ptr<std::locale> archive_locale;
80 basic_streambuf_locale_saver< 75 basic_streambuf_locale_saver<
81 BOOST_DEDUCED_TYPENAME IStream::char_type, 76 typename IStream::char_type,
82 BOOST_DEDUCED_TYPENAME IStream::traits_type 77 typename IStream::traits_type
83 > locale_saver; 78 > locale_saver;
84 #endif 79 #endif
85 80
86 template<class T> 81 template<class T>
87 void load(T & t) 82 void load(T & t)
88 { 83 {
89 if(! is.fail()){ 84 if(is >> t)
90 is >> t;
91 return; 85 return;
92 }
93 boost::serialization::throw_exception( 86 boost::serialization::throw_exception(
94 archive_exception(archive_exception::input_stream_error) 87 archive_exception(archive_exception::input_stream_error)
95 ); 88 );
96 } 89 }
97 90