1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/serialization/utility.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,47 @@
1.4 +#ifndef BOOST_SERIALIZATION_UTILITY_HPP
1.5 +#define BOOST_SERIALIZATION_UTILITY_HPP
1.6 +
1.7 +// MS compatible compilers support #pragma once
1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1.9 +# pragma once
1.10 +#endif
1.11 +
1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
1.13 +// serialization/utility.hpp:
1.14 +// serialization for stl utility templates
1.15 +
1.16 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
1.17 +// Use, modification and distribution is subject to the Boost Software
1.18 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.19 +// http://www.boost.org/LICENSE_1_0.txt)
1.20 +
1.21 +// See http://www.boost.org for updates, documentation, and revision history.
1.22 +
1.23 +#include <utility>
1.24 +#include <boost/config.hpp>
1.25 +
1.26 +#include <boost/type_traits/remove_const.hpp>
1.27 +#include <boost/serialization/nvp.hpp>
1.28 +
1.29 +namespace boost {
1.30 +namespace serialization {
1.31 +
1.32 +// pair
1.33 +template<class Archive, class F, class S>
1.34 +inline void serialize(
1.35 + Archive & ar,
1.36 + std::pair<F, S> & p,
1.37 + const unsigned int /* file_version */
1.38 +){
1.39 + // note: we remove any const-ness on the first argument. The reason is that
1.40 + // for stl maps, the type saved is pair<const key, T). We remove
1.41 + // the const-ness in order to be able to load it.
1.42 + typedef BOOST_DEDUCED_TYPENAME boost::remove_const<F>::type typef;
1.43 + ar & boost::serialization::make_nvp("first", const_cast<typef &>(p.first));
1.44 + ar & boost::serialization::make_nvp("second", p.second);
1.45 +}
1.46 +
1.47 +} // serialization
1.48 +} // namespace boost
1.49 +
1.50 +#endif // BOOST_SERIALIZATION_UTILITY_HPP