1 #ifndef BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
2 #define BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // is_abstract_class.hpp:
12 // (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and 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 #include <boost/config.hpp>
20 #include <boost/mpl/bool.hpp>
21 #include <boost/type_traits/is_abstract.hpp>
24 namespace serialization {
27 // default to false if not supported
28 #ifdef BOOST_NO_IS_ABSTRACT
29 typedef BOOST_DEDUCED_TYPENAME mpl::bool_<false> type;
30 BOOST_STATIC_CONSTANT(bool, value = false);
32 typedef BOOST_DEDUCED_TYPENAME boost::is_abstract<T>::type type;
33 BOOST_STATIC_CONSTANT(bool, value = type::value);
36 } // namespace serialization
39 // define a macro to make explicit designation of this more transparent
40 #define BOOST_IS_ABSTRACT(T) \
42 namespace serialization { \
44 struct is_abstract< T > { \
45 typedef mpl::bool_<true> type; \
46 BOOST_STATIC_CONSTANT(bool, value = true); \
52 #endif //BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP