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