epoc32/include/stdapis/boost/serialization/version.hpp
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/boost/serialization/version.hpp	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/boost/serialization/version.hpp	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,35 +1,87 @@
     1.4 -//  Boost version.hpp configuration header file  ------------------------------//
     1.5 +#ifndef BOOST_SERIALIZATION_VERSION_HPP
     1.6 +#define BOOST_SERIALIZATION_VERSION_HPP
     1.7  
     1.8 -//  (C) Copyright John maddock 1999. Distributed under the Boost
     1.9 -//  Software License, Version 1.0. (See accompanying file
    1.10 -//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    1.11 -
    1.12 -//  See http://www.boost.org/libs/config for documentation
    1.13 -
    1.14 -#ifndef BOOST_VERSION_HPP
    1.15 -#define BOOST_VERSION_HPP
    1.16 -
    1.17 -//
    1.18 -//  Caution, this is the only boost header that is guarenteed
    1.19 -//  to change with every boost release, including this header
    1.20 -//  will cause a recompile every time a new boost version is
    1.21 -//  released.
    1.22 -//
    1.23 -//  BOOST_VERSION % 100 is the sub-minor version
    1.24 -//  BOOST_VERSION / 100 % 1000 is the minor version
    1.25 -//  BOOST_VERSION / 100000 is the major version
    1.26 -
    1.27 -#define BOOST_VERSION 103400
    1.28 -
    1.29 -//
    1.30 -//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
    1.31 -//  but as a *string* in the form "x_y" where x is the major version
    1.32 -//  number and y is the minor version number.  This is used by
    1.33 -//  <config/auto_link.hpp> to select which library version to link to.
    1.34 -
    1.35 -#define BOOST_LIB_VERSION "1_34"
    1.36 -
    1.37 +// MS compatible compilers support #pragma once
    1.38 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
    1.39 +# pragma once
    1.40  #endif
    1.41  
    1.42 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
    1.43 +// version.hpp:
    1.44  
    1.45 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
    1.46 +// Use, modification and distribution is subject to the Boost Software
    1.47 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    1.48 +// http://www.boost.org/LICENSE_1_0.txt)
    1.49  
    1.50 +//  See http://www.boost.org for updates, documentation, and revision history.
    1.51 +
    1.52 +#include <boost/config.hpp>
    1.53 +#include <boost/mpl/int.hpp>
    1.54 +#include <boost/mpl/eval_if.hpp>
    1.55 +#include <boost/mpl/identity.hpp>
    1.56 +#include <boost/mpl/integral_c_tag.hpp>
    1.57 +
    1.58 +#include <boost/type_traits/is_base_and_derived.hpp>
    1.59 +//#include <boost/serialization/traits.hpp>
    1.60 +
    1.61 +namespace boost { 
    1.62 +namespace serialization {
    1.63 +
    1.64 +struct basic_traits;
    1.65 +
    1.66 +// default version number is 0. Override with higher version
    1.67 +// when class definition changes.
    1.68 +template<class T>
    1.69 +struct version
    1.70 +{
    1.71 +    template<class U>
    1.72 +    struct traits_class_version {
    1.73 +        typedef BOOST_DEDUCED_TYPENAME U::version type;
    1.74 +    };
    1.75 +
    1.76 +    typedef mpl::integral_c_tag tag;
    1.77 +    // note: at least one compiler complained w/o the full qualification
    1.78 +    // on basic traits below
    1.79 +    typedef
    1.80 +        BOOST_DEDUCED_TYPENAME mpl::eval_if<
    1.81 +            is_base_and_derived<boost::serialization::basic_traits,T>,
    1.82 +            traits_class_version<T>,
    1.83 +            mpl::int_<0>
    1.84 +        >::type type;
    1.85 +    BOOST_STATIC_CONSTANT(unsigned int, value = version::type::value);
    1.86 +};
    1.87 +
    1.88 +} // namespace serialization
    1.89 +} // namespace boost
    1.90 +
    1.91 +// specify the current version number for the class
    1.92 +#define BOOST_CLASS_VERSION(T, N)                                      \
    1.93 +namespace boost {                                                      \
    1.94 +namespace serialization {                                              \
    1.95 +template<>                                                             \
    1.96 +struct version<T >                                                     \
    1.97 +{                                                                      \
    1.98 +    typedef mpl::int_<N> type;                                         \
    1.99 +    typedef mpl::integral_c_tag tag;                                   \
   1.100 +    BOOST_STATIC_CONSTANT(unsigned int, value = version::type::value); \
   1.101 +    /* require that class info saved when versioning is used */        \
   1.102 +    /*                                                                 \
   1.103 +    BOOST_STATIC_ASSERT((                                              \
   1.104 +        mpl::or_<                                                      \
   1.105 +            mpl::equal_to<                                             \
   1.106 +                mpl::int_<0>,                                          \
   1.107 +                mpl::int_<N>                                           \
   1.108 +            >,                                                         \
   1.109 +            mpl::equal_to<                                             \
   1.110 +                implementation_level<T>,                               \
   1.111 +                mpl::int_<object_class_info>                           \
   1.112 +            >                                                          \
   1.113 +        >::value                                                       \
   1.114 +    ));                                                                \
   1.115 +    */                                                                 \
   1.116 +};                                                                     \
   1.117 +}                                                                      \
   1.118 +}
   1.119 +
   1.120 +#endif // BOOST_SERIALIZATION_VERSION_HPP