~ubuntu-branches/ubuntu/saucy/deal.ii/saucy

« back to all changes in this revision

Viewing changes to contrib/boost-1.46.1/include/boost/serialization/weak_ptr.hpp

  • Committer: Package Import Robot
  • Author(s): "Adam C. Powell, IV", Adam C. Powell, IV, Christophe Trophime
  • Date: 2012-02-21 06:57:30 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120221065730-r2iz70lg557wcd2e
Tags: 7.1.0-1
[ Adam C. Powell, IV ]
* New upstream (closes: #652057).
* Updated to use PETSc and SLEPc 3.2, and forward-ported all patches.
* Removed NetCDF Build-Depends because it uses serial HDF5.
* Made Sacado cmath patch work with new configure.
* Moved -dev package symlink lines in rules to arch all section.

[ Christophe Trophime ]
* debian/rules:
   - add dh_strip --dbg-package to generate dbg package (closes: #652058)
   - add .install files to simplify rules
* Add support for mumps, arpack (closes: #637655)
* Add patch for slepc 3.2 (closes: #659245)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef BOOST_SERIALIZATION_WEAK_PTR_HPP
 
2
#define BOOST_SERIALIZATION_WEAK_PTR_HPP
 
3
 
 
4
// MS compatible compilers support #pragma once
 
5
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
 
6
# pragma once
 
7
#endif
 
8
 
 
9
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 
10
// shared_ptr.hpp: serialization for boost shared pointer
 
11
 
 
12
// (C) Copyright 2004 Robert Ramey and Martin Ecker
 
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)
 
16
 
 
17
//  See http://www.boost.org for updates, documentation, and revision history.
 
18
 
 
19
#include <boost/weak_ptr.hpp>
 
20
#include <boost/serialization/shared_ptr.hpp>
 
21
 
 
22
namespace boost {
 
23
namespace serialization{
 
24
 
 
25
template<class Archive, class T>
 
26
inline void save(
 
27
    Archive & ar,
 
28
    const boost::weak_ptr< T > &t,
 
29
    const unsigned int /* file_version */
 
30
){
 
31
    const boost::shared_ptr< T > sp = t.lock();
 
32
    ar << boost::serialization::make_nvp("weak_ptr", sp);
 
33
}
 
34
 
 
35
template<class Archive, class T>
 
36
inline void load(
 
37
    Archive & ar,
 
38
    boost::weak_ptr< T > &t,
 
39
    const unsigned int /* file_version */
 
40
){
 
41
    boost::shared_ptr< T > sp;
 
42
    ar >> boost::serialization::make_nvp("weak_ptr", sp);
 
43
    t = sp;
 
44
}
 
45
 
 
46
template<class Archive, class T>
 
47
inline void serialize(
 
48
    Archive & ar,
 
49
    boost::weak_ptr< T > &t,
 
50
    const unsigned int file_version
 
51
){
 
52
    boost::serialization::split_free(ar, t, file_version);
 
53
}
 
54
 
 
55
} // namespace serialization
 
56
} // namespace boost
 
57
 
 
58
#endif // BOOST_SERIALIZATION_WEAK_PTR_HPP