]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/serialization/test/test_const_save_warn4_nvp.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / serialization / test / test_const_save_warn4_nvp.cpp
1 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
2 // test_const.cpp
3
4 // (C) Copyright 2002 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 // compile only
10
11 #include <boost/archive/text_oarchive.hpp>
12 #include <boost/serialization/nvp.hpp>
13
14 using namespace boost::archive;
15
16 struct A {
17 template<class Archive>
18 void serialize(Archive & ar, unsigned int version) {
19 }
20 };
21
22 // comment out this test case as a reminder not to keep inserting it !!!
23 // we don't trap this as an error in order to permit things like
24 // X * xptr;
25 // save(..){
26 // ar << xptr;
27 // }
28 //
29 // for rational - consider the following example from demo.cpp
30 //
31 // std::list<pair<trip_info, bus_route_info *> > schedule
32 //
33 // its not obvious to me how this can be cast to:
34 //
35 // std::list<pair<trip_info, const bus_route_info * const> > schedule
36
37 void f4(text_oarchive & oa, A * const & a){
38 oa << BOOST_SERIALIZATION_NVP(a);
39 }