Project revived from Feb2017
[EroSomnia.git] / deps / boost_1_63_0 / boost / serialization / assume_abstract.hpp
blob632f9312f5f98bb906feeb7737397a0c79b189d1
1 #ifndef BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP
2 #define BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER)
6 # pragma once
7 #endif
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // assume_abstract_class.hpp:
12 // (C) Copyright 2008 Robert Ramey
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 // this is useful for compilers which don't support the boost::is_abstract
21 #include <boost/type_traits/is_abstract.hpp>
22 #include <boost/mpl/bool_fwd.hpp>
24 #ifndef BOOST_NO_IS_ABSTRACT
26 // if there is an intrinsic is_abstract defined, we don't have to do anything
27 #define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T)
29 // but forward to the "official" is_abstract
30 namespace boost {
31 namespace serialization {
32 template<class T>
33 struct is_abstract : boost::is_abstract< T > {} ;
34 } // namespace serialization
35 } // namespace boost
37 #else
38 // we have to "make" one
40 namespace boost {
41 namespace serialization {
42 template<class T>
43 struct is_abstract : boost::false_type {};
44 } // namespace serialization
45 } // namespace boost
47 // define a macro to make explicit designation of this more transparent
48 #define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T) \
49 namespace boost { \
50 namespace serialization { \
51 template<> \
52 struct is_abstract< T > : boost::true_type {}; \
53 template<> \
54 struct is_abstract< const T > : boost::true_type {}; \
55 }} \
56 /**/
58 #endif // BOOST_NO_IS_ABSTRACT
60 #endif //BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP