1 #ifndef BOOST_SERIALIZATION_ARRAY_HPP
2 #define BOOST_SERIALIZATION_ARRAY_HPP
4 // (C) Copyright 2005 Matthias Troyer and Dave Abrahams
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)
9 // for serialization of <array>. If <array> not supported by the standard
10 // library - this file becomes empty. This is to avoid breaking backward
11 // compatibiliy for applications which used this header to support
12 // serialization of native arrays. Code to serialize native arrays is
13 // now always include by default. RR
15 #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
17 #if defined(BOOST_NO_STDC_NAMESPACE)
20 #include <cstddef> // std::size_t
26 #include <boost/serialization/array_wrapper.hpp>
28 #ifndef BOOST_NO_CXX11_HDR_ARRAY
31 #include <boost/serialization/nvp.hpp>
33 namespace boost { namespace serialization {
35 template <class Archive, class T, std::size_t N>
36 void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */)
38 ar & boost::serialization::make_nvp(
40 *static_cast<T (*)[N]>(static_cast<void *>(a.data()))
44 } } // end namespace boost::serialization
46 #endif // BOOST_NO_CXX11_HDR_ARRAY
48 #endif //BOOST_SERIALIZATION_ARRAY_HPP