File indexing completed on 2024-11-15 09:30:59
0001 #ifndef BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP
0002 #define BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
0010
0011 #if defined(BOOST_NO_STDC_NAMESPACE)
0012 namespace std{
0013 using ::size_t;
0014 }
0015 #endif
0016
0017 #include <boost/mpl/always.hpp>
0018 #include <boost/mpl/apply.hpp>
0019 #include <boost/type_traits/remove_const.hpp>
0020
0021 namespace boost { namespace serialization {
0022
0023 template <class Archive>
0024 struct use_array_optimization : boost::mpl::always<boost::mpl::false_> {};
0025
0026 } }
0027
0028 #define BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(Archive) \
0029 namespace boost { namespace serialization { \
0030 template <> struct use_array_optimization<Archive> { \
0031 template <class ValueType> \
0032 struct apply : boost::mpl::apply1<Archive::use_array_optimization \
0033 , typename boost::remove_const<ValueType>::type \
0034 >::type {}; \
0035 }; }}
0036
0037 #endif