1 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
2 | // test_polymorphic2.hpp |
3 | |
4 | // (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . |
5 | // Use, modification and distribution is subject to the Boost Software |
6 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
7 | // http://www.boost.org/LICENSE_1_0.txt) |
8 | |
9 | // should pass compilation and execution |
10 | namespace boost { |
11 | namespace archive { |
12 | class polymorphic_oarchive; |
13 | class polymorphic_iarchive; |
14 | } |
15 | } |
16 | |
17 | struct A { |
18 | public: |
19 | A() {} |
20 | virtual ~A() {} |
21 | |
22 | void serialize( |
23 | boost::archive::polymorphic_oarchive &ar, |
24 | const unsigned int /*version*/ |
25 | ); |
26 | void serialize( |
27 | boost::archive::polymorphic_iarchive &ar, |
28 | const unsigned int /*version*/ |
29 | ); |
30 | |
31 | int i; |
32 | }; |
33 | |
34 | struct B : A { |
35 | void serialize( |
36 | boost::archive::polymorphic_oarchive &ar, |
37 | const unsigned int /*version*/ |
38 | ); |
39 | void serialize( |
40 | boost::archive::polymorphic_iarchive &ar, |
41 | const unsigned int /*version*/ |
42 | ); |
43 | }; |
44 | |