fix doc example typo
[boost.git] / boost / serialization / deque.hpp
blob340d5feedc23c4e802624f3adefb280f89b9d39d
1 #ifndef BOOST_SERIALIZATION_DEQUE_HPP
2 #define BOOST_SERIALIZATION_DEQUE_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
6 # pragma once
7 #endif
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // deque.hpp
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <deque>
21 #include <boost/config.hpp>
23 #include <boost/serialization/collections_save_imp.hpp>
24 #include <boost/serialization/collections_load_imp.hpp>
25 #include <boost/serialization/split_free.hpp>
27 namespace boost {
28 namespace serialization {
30 template<class Archive, class U, class Allocator>
31 inline void save(
32 Archive & ar,
33 const std::deque<U, Allocator> &t,
34 const unsigned int /* file_version */
36 boost::serialization::stl::save_collection<
37 Archive, std::deque<U, Allocator>
38 >(ar, t);
41 template<class Archive, class U, class Allocator>
42 inline void load(
43 Archive & ar,
44 std::deque<U, Allocator> &t,
45 const unsigned int /*file_version*/
47 boost::serialization::stl::load_collection<
48 Archive,
49 std::deque<U, Allocator>,
50 boost::serialization::stl::archive_input_seq<
51 Archive, std::deque<U, Allocator>
53 boost::serialization::stl::no_reserve_imp<std::deque<U, Allocator> >
54 >(ar, t);
57 // split non-intrusive serialization function member into separate
58 // non intrusive save/load member functions
59 template<class Archive, class U, class Allocator>
60 inline void serialize(
61 Archive & ar,
62 std::deque<U, Allocator> &t,
63 const unsigned int file_version
65 boost::serialization::split_free(ar, t, file_version);
68 } // namespace serialization
69 } // namespace boost
71 #include <boost/serialization/collection_traits.hpp>
73 BOOST_SERIALIZATION_COLLECTION_TRAITS(std::deque)
75 #endif // BOOST_SERIALIZATION_DEQUE_HPP