1 #ifndef BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP
2 #define BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_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 #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
11 #if defined(BOOST_NO_STDC_NAMESPACE)
17 #include <boost/mpl/always.hpp>
18 #include <boost/mpl/apply.hpp>
19 #include <boost/type_traits/remove_const.hpp>
21 namespace boost { namespace serialization {
23 template <class Archive>
24 struct use_array_optimization : boost::mpl::always<boost::mpl::false_> {};
26 } } // end namespace boost::serialization
28 #define BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(Archive) \
29 namespace boost { namespace serialization { \
30 template <> struct use_array_optimization<Archive> { \
31 template <class ValueType> \
32 struct apply : boost::mpl::apply1<Archive::use_array_optimization \
33 , typename boost::remove_const<ValueType>::type \
37 #endif //BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP