Update contrib.
1 #ifndef BOOST_SERIALIZATION_SCOPED_PTR_HPP_VP_2003_10_30
2 #define BOOST_SERIALIZATION_SCOPED_PTR_HPP_VP_2003_10_30
4 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
8 // Copyright (c) 2003 Vladimir Prus.
9 // Use, modification and distribution is subject to the Boost Software
10 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
13 // Provides non-intrusive serialization for boost::scoped_ptr
14 // Does not allow to serialize scoped_ptr's to builtin types.
16 #include <boost/config.hpp>
18 #include <boost/scoped_ptr.hpp>
19 #include <boost/serialization/nvp.hpp>
20 #include <boost/serialization/split_free.hpp>
23 namespace serialization {
25 template<class Archive, class T>
28 const boost::scoped_ptr<T> & t,
29 const unsigned int /* version */
32 ar << boost::serialization::make_nvp("scoped_ptr", r);
35 template<class Archive, class T>
38 boost::scoped_ptr<T> & t,
39 const unsigned int /* version */
42 ar >> boost::serialization::make_nvp("scoped_ptr", r);
46 template<class Archive, class T>
49 boost::scoped_ptr<T>& t,
50 const unsigned int version
52 boost::serialization::split_free(ar, t, version);
55 } // namespace serialization
58 #endif // BOOST_SERIALIZATION_SCOPED_PTR_HPP_VP_2003_10_30