comparison DEPENDENCIES/generic/include/boost/serialization/optional.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
8 // Provides non-intrusive serialization for boost::optional. 8 // Provides non-intrusive serialization for boost::optional.
9 9
10 #ifndef BOOST_SERIALIZATION_OPTIONAL_HPP_ 10 #ifndef BOOST_SERIALIZATION_OPTIONAL_HPP_
11 #define BOOST_SERIALIZATION_OPTIONAL_HPP_ 11 #define BOOST_SERIALIZATION_OPTIONAL_HPP_
12 12
13 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 13 #if defined(_MSC_VER)
14 # pragma once 14 # pragma once
15 #endif 15 #endif
16 16
17 #include <boost/config.hpp> 17 #include <boost/config.hpp>
18 18
88 const unsigned int version 88 const unsigned int version
89 ){ 89 ){
90 boost::serialization::split_free(ar, t, version); 90 boost::serialization::split_free(ar, t, version);
91 } 91 }
92 92
93 // the following would be slightly more efficient. But it
94 // would mean that archives created with programs that support
95 // TPS wouldn't be readable by programs that don't support TPS.
96 // Hence we decline to support this otherwise convenient optimization.
97 //#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
98 #if 0
99
100 template <class T>
101 struct implementation_level<optional< T > >
102 {
103 typedef mpl::integral_c_tag tag;
104 typedef mpl::int_<boost::serialization::object_serializable> type;
105 BOOST_STATIC_CONSTANT(
106 int ,
107 value = boost::serialization::implementation_level::type::value
108 );
109 };
110
111 template<class T>
112 struct tracking_level<optional< T > >
113 {
114 typedef mpl::integral_c_tag tag;
115 typedef mpl::int_<boost::serialization::track_never> type;
116 BOOST_STATIC_CONSTANT(
117 int ,
118 value = boost::serialization::tracking_level::type::value
119 );
120 };
121
122 #endif
123
124 } // serialization 93 } // serialization
125 } // namespace boost 94 } // namespace boost
126 95
127 #endif // BOOST_SERIALIZATION_OPTIONAL_HPP_ 96 #endif // BOOST_SERIALIZATION_OPTIONAL_HPP_