]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/serialization/example/demo_polymorphic_A.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / serialization / example / demo_polymorphic_A.hpp
CommitLineData
7c673cae
FG
1#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP
2#define BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP
3
4/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
5// demo_polymorphic_A.hpp
6
7// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
8// Use, modification and distribution is subject to the Boost Software
9// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10// http://www.boost.org/LICENSE_1_0.txt)
11
12namespace boost {
13namespace archive {
14
15class polymorphic_iarchive;
16class polymorphic_oarchive;
17
18} // namespace archive
19} // namespace boost
20
21struct A {
22 // class a contains a pointer to a "hidden" declaration
23 template<class Archive>
24 void serialize(
25 Archive & ar,
26 const unsigned int file_version
27 ){
28 ar & data;
29 }
30 int data;
31 bool operator==(const A & rhs) const {
32 return data == rhs.data;
33 }
34 A() :
35 data(0)
36 {}
37};
38
39#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP