1 #ifndef BOOST_SERIALIZATION_EPHEMERAL_HPP
2 #define BOOST_SERIALIZATION_EPHEMERAL_HPP
4 // MS compatible compilers support
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // ephemeral_object.hpp: interface for serialization system.
12 // (C) Copyright 2007 Matthias Troyer.
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
21 #include <boost/config.hpp>
22 #include <boost/detail/workaround.hpp>
24 #include <boost/mpl/integral_c.hpp>
25 #include <boost/mpl/integral_c_tag.hpp>
27 #include <boost/serialization/level.hpp>
28 #include <boost/serialization/tracking.hpp>
29 #include <boost/serialization/split_member.hpp>
30 #include <boost/serialization/base_object.hpp>
31 #include <boost/serialization/traits.hpp>
32 #include <boost/serialization/wrapper.hpp>
35 namespace serialization {
38 struct ephemeral_object :
39 public wrapper_traits<ephemeral_object<T> >
41 explicit ephemeral_object(T& t) :
49 const T & const_value() const {
53 template<class Archive>
54 void serialize(Archive &ar, const unsigned int) const
65 const ephemeral_object<T> ephemeral(const char * name, T & t){
66 return ephemeral_object<T>(name, t);
72 #endif // BOOST_SERIALIZATION_EPHEMERAL_HPP