Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:30:59

0001 #ifndef BOOST_SERIALIZATION_ARRAY_HPP
0002 #define BOOST_SERIALIZATION_ARRAY_HPP
0003 
0004 // (C) Copyright 2005 Matthias Troyer and Dave Abrahams
0005 // Use, modification and distribution is subject to the Boost Software
0006 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 // for serialization of <array>. If <array> not supported by the standard
0010 // library - this file becomes empty.  This is to avoid breaking backward
0011 // compatibility for applications which used this header to support
0012 // serialization of native arrays.  Code to serialize native arrays is
0013 // now always include by default.  RR
0014 
0015 #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
0016 
0017 #if defined(BOOST_NO_STDC_NAMESPACE)
0018 
0019 #include <iostream>
0020 #include <cstddef> // std::size_t
0021 namespace std{
0022     using ::size_t;
0023 } // namespace std
0024 #endif
0025 
0026 #include <boost/serialization/array_wrapper.hpp>
0027 
0028 #ifndef BOOST_NO_CXX11_HDR_ARRAY
0029 
0030 #include <array>
0031 #include <boost/serialization/nvp.hpp>
0032 
0033 namespace boost { namespace serialization {
0034 
0035 template <class Archive, class T, std::size_t N>
0036 void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */)
0037 {
0038     ar & boost::serialization::make_nvp(
0039         "elems",
0040         *static_cast<T (*)[N]>(static_cast<void *>(a.data()))
0041     );
0042 
0043 }
0044 } } // end namespace boost::serialization
0045 
0046 #endif // BOOST_NO_CXX11_HDR_ARRAY
0047 
0048 #endif //BOOST_SERIALIZATION_ARRAY_HPP