annotate DEPENDENCIES/generic/include/boost/serialization/assume_abstract.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 #ifndef BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP
Chris@16 2 #define BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP
Chris@16 3
Chris@16 4 // MS compatible compilers support #pragma once
Chris@101 5 #if defined(_MSC_VER)
Chris@16 6 # pragma once
Chris@16 7 #endif
Chris@16 8
Chris@16 9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
Chris@16 10 // assume_abstract_class.hpp:
Chris@16 11
Chris@16 12 // (C) Copyright 2008 Robert Ramey
Chris@16 13 // Use, modification and distribution is subject to the Boost Software
Chris@16 14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 15 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 16
Chris@16 17 // See http://www.boost.org for updates, documentation, and revision history.
Chris@16 18
Chris@16 19 // this is useful for compilers which don't support the boost::is_abstract
Chris@16 20
Chris@16 21 #include <boost/type_traits/is_abstract.hpp>
Chris@16 22
Chris@16 23 #ifndef BOOST_NO_IS_ABSTRACT
Chris@16 24
Chris@16 25 // if there is an intrinsic is_abstract defined, we don't have to do anything
Chris@16 26 #define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T)
Chris@16 27
Chris@16 28 // but forward to the "official" is_abstract
Chris@16 29 namespace boost {
Chris@16 30 namespace serialization {
Chris@16 31 template<class T>
Chris@16 32 struct is_abstract : boost::is_abstract< T > {} ;
Chris@16 33 } // namespace serialization
Chris@16 34 } // namespace boost
Chris@16 35
Chris@16 36 #else
Chris@16 37 // we have to "make" one
Chris@16 38
Chris@16 39 namespace boost {
Chris@16 40 namespace serialization {
Chris@16 41 template<class T>
Chris@16 42 struct is_abstract : boost::false_type {};
Chris@16 43 } // namespace serialization
Chris@16 44 } // namespace boost
Chris@16 45
Chris@16 46 // define a macro to make explicit designation of this more transparent
Chris@16 47 #define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T) \
Chris@16 48 namespace boost { \
Chris@16 49 namespace serialization { \
Chris@16 50 template<> \
Chris@16 51 struct is_abstract< T > : boost::true_type {}; \
Chris@16 52 template<> \
Chris@16 53 struct is_abstract< const T > : boost::true_type {}; \
Chris@16 54 }} \
Chris@16 55 /**/
Chris@16 56
Chris@16 57 #endif // BOOST_NO_IS_ABSTRACT
Chris@16 58
Chris@16 59 #endif //BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP