1 #ifndef BOOST_SERIALIZATION_EPHEMERAL_HPP
2 #define BOOST_SERIALIZATION_EPHEMERAL_HPP
4 // MS compatible compilers support
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
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 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
26 # pragma warning (disable : 4786) // too long name, harmless warning
29 #include <boost/mpl/integral_c.hpp>
30 #include <boost/mpl/integral_c_tag.hpp>
32 #include <boost/serialization/level.hpp>
33 #include <boost/serialization/tracking.hpp>
34 #include <boost/serialization/split_member.hpp>
35 #include <boost/serialization/base_object.hpp>
36 #include <boost/serialization/traits.hpp>
37 #include <boost/serialization/wrapper.hpp>
40 namespace serialization
{
43 struct ephemeral_object
:
44 public wrapper_traits
<ephemeral_object
<T
> >
46 explicit ephemeral_object(T
& t
) :
54 const T
& const_value() const {
58 template<class Archive
>
59 void serialize(Archive
&ar
, const unsigned int) const
70 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
73 ephemeral_object
<T
> ephemeral(const char * name
, T
& t
){
74 return ephemeral_object
<T
>(name
, t
);
80 #endif // BOOST_SERIALIZATION_EPHEMERAL_HPP