boost_array.hpp 974 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef BOOST_SERIALIZATION_BOOST_ARRAY_HPP
  2. #define BOOST_SERIALIZATION_BOOST_ARRAY_HPP
  3. // (C) Copyright 2005 Matthias Troyer and Dave Abrahams
  4. // Use, modification and distribution is subject to the Boost Software
  5. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //#include <iostream>
  8. #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
  9. #if defined(BOOST_NO_STDC_NAMESPACE)
  10. namespace std{
  11. using ::size_t;
  12. } // namespace std
  13. #endif
  14. #include <boost/serialization/nvp.hpp>
  15. #include <boost/array.hpp>
  16. namespace boost { namespace serialization {
  17. // implement serialization for boost::array
  18. template <class Archive, class T, std::size_t N>
  19. void serialize(Archive& ar, boost::array<T,N>& a, const unsigned int /* version */)
  20. {
  21. ar & boost::serialization::make_nvp("elems", a.elems);
  22. }
  23. } } // end namespace boost::serialization
  24. #endif //BOOST_SERIALIZATION_BOOST_ARRAY_HPP