123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef BOOST_SERIALIZATION_PFTO_HPP
- #define BOOST_SERIALIZATION_PFTO_HPP
- #if defined(_MSC_VER) && (_MSC_VER >= 1020)
- # pragma once
- #endif
- #include <boost/config.hpp>
- #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
- #define BOOST_PFTO long
- #else
- #define BOOST_PFTO
- #endif
- namespace boost {
- namespace serialization {
- template<class T>
- struct pfto_wrapper {
- const T & t;
- operator const T & (){
- return t;
- }
- pfto_wrapper (const T & rhs) : t(rhs) {}
- };
- template<class T>
- pfto_wrapper<T> make_pfto_wrapper(const T & t, BOOST_PFTO int){
- return pfto_wrapper<T>(t);
- }
- template<class T>
- pfto_wrapper<T> make_pfto_wrapper(const pfto_wrapper<T> & t, int){
- return t;
- }
- }
- }
- #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- #define BOOST_PFTO_WRAPPER(T) \
- boost::serialization::pfto_wrapper<T>
- #define BOOST_MAKE_PFTO_WRAPPER(t) \
- boost::serialization::make_pfto_wrapper(t, 0)
- #else
- #define BOOST_PFTO_WRAPPER(T) T
- #define BOOST_MAKE_PFTO_WRAPPER(t) t
- #endif
- #endif
|