Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:46

0001 // -----------------------------------------------------------
0002 //
0003 // Copyright (c) 2015 Seth Heeren
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 //    (See accompanying file LICENSE_1_0.txt or copy at
0007 //          http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // -----------------------------------------------------------
0010 
0011 #ifndef BOOST_DYNAMIC_BITSET_SERIALIZATION_HPP
0012 #define BOOST_DYNAMIC_BITSET_SERIALIZATION_HPP
0013 
0014 #include "boost/dynamic_bitset/dynamic_bitset.hpp"
0015 #include <boost/core/nvp.hpp>
0016 
0017 namespace boost {
0018 
0019     // implementation for optional zero-copy serialization support
0020     template <typename Block, typename Allocator>
0021         class dynamic_bitset<Block, Allocator>::serialize_impl
0022         {
0023             public:
0024                 template <typename Ar> 
0025                 static void serialize(Ar& ar, dynamic_bitset<Block, Allocator>& bs, unsigned) {
0026                     ar & boost::make_nvp("m_num_bits", bs.m_num_bits)
0027                        & boost::make_nvp("m_bits", bs.m_bits);
0028                 }
0029         };
0030 
0031 }
0032 
0033 // ADL hook to Boost Serialization library
0034 namespace boost {
0035     namespace serialization {
0036 
0037         template <typename Ar, typename Block, typename Allocator>
0038             void serialize(Ar& ar, dynamic_bitset<Block, Allocator>& bs, unsigned version) {
0039                 dynamic_bitset<Block, Allocator>::serialize_impl::serialize(ar, bs, version);
0040             }
0041 
0042     } // namespace serialization
0043 } // namespace boost
0044 
0045 #endif // include guard
0046