comparison DEPENDENCIES/generic/include/boost/archive/basic_binary_oprimitive.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_BINARY_OPRIMITIVE_HPP 1 #ifndef BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP
2 #define BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP 2 #define BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_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_binary_oprimitive.hpp 10 // basic_binary_oprimitive.hpp
52 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header 52 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
53 53
54 namespace boost { 54 namespace boost {
55 namespace archive { 55 namespace archive {
56 56
57 template<class Ch>
58 class codecvt_null;
59
57 ///////////////////////////////////////////////////////////////////////// 60 /////////////////////////////////////////////////////////////////////////
58 // class basic_binary_oprimitive - binary output of prmitives 61 // class basic_binary_oprimitive - binary output of prmitives
59 62
60 template<class Archive, class Elem, class Tr> 63 template<class Archive, class Elem, class Tr>
61 class basic_binary_oprimitive 64 class basic_binary_oprimitive {
62 {
63 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS 65 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
64 friend class save_access; 66 friend class save_access;
65 protected: 67 protected:
66 #else 68 #else
67 public: 69 public:
70 // return a pointer to the most derived class 72 // return a pointer to the most derived class
71 Archive * This(){ 73 Archive * This(){
72 return static_cast<Archive *>(this); 74 return static_cast<Archive *>(this);
73 } 75 }
74 #ifndef BOOST_NO_STD_LOCALE 76 #ifndef BOOST_NO_STD_LOCALE
77 boost::scoped_ptr<codecvt_null<Elem> > codecvt_facet;
75 boost::scoped_ptr<std::locale> archive_locale; 78 boost::scoped_ptr<std::locale> archive_locale;
76 basic_streambuf_locale_saver<Elem, Tr> locale_saver; 79 basic_streambuf_locale_saver<Elem, Tr> locale_saver;
77 #endif 80 #endif
78 // default saving of primitives. 81 // default saving of primitives.
79 template<class T> 82 template<class T>
120 // workaround without using mpl lambdas 123 // workaround without using mpl lambdas
121 struct use_array_optimization { 124 struct use_array_optimization {
122 template <class T> 125 template <class T>
123 #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) 126 #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
124 struct apply { 127 struct apply {
125 typedef BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type; 128 typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
126 }; 129 };
127 #else 130 #else
128 struct apply : public boost::serialization::is_bitwise_serializable< T > {}; 131 struct apply : public boost::serialization::is_bitwise_serializable< T > {};
129 #endif 132 #endif
130 }; 133 };
168 if(count != static_cast<std::size_t>(scount)) 171 if(count != static_cast<std::size_t>(scount))
169 boost::serialization::throw_exception( 172 boost::serialization::throw_exception(
170 archive_exception(archive_exception::output_stream_error) 173 archive_exception(archive_exception::output_stream_error)
171 ); 174 );
172 //os.write( 175 //os.write(
173 // static_cast<const BOOST_DEDUCED_TYPENAME OStream::char_type *>(address), 176 // static_cast<const typename OStream::char_type *>(address),
174 // count 177 // count
175 //); 178 //);
176 //BOOST_ASSERT(os.good()); 179 //BOOST_ASSERT(os.good());
177 } 180 }
178 181