Chris@16: #ifndef BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP Chris@16: #define BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP Chris@16: Chris@16: // MS compatible compilers support #pragma once Chris@101: #if defined(_MSC_VER) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@16: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 Chris@16: // assume_abstract_class.hpp: Chris@16: Chris@16: // (C) Copyright 2008 Robert Ramey Chris@16: // Use, modification and distribution is subject to the Boost Software Chris@16: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org for updates, documentation, and revision history. Chris@16: Chris@16: // this is useful for compilers which don't support the boost::is_abstract Chris@16: Chris@16: #include Chris@16: Chris@16: #ifndef BOOST_NO_IS_ABSTRACT Chris@16: Chris@16: // if there is an intrinsic is_abstract defined, we don't have to do anything Chris@16: #define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T) Chris@16: Chris@16: // but forward to the "official" is_abstract Chris@16: namespace boost { Chris@16: namespace serialization { Chris@16: template Chris@16: struct is_abstract : boost::is_abstract< T > {} ; Chris@16: } // namespace serialization Chris@16: } // namespace boost Chris@16: Chris@16: #else Chris@16: // we have to "make" one Chris@16: Chris@16: namespace boost { Chris@16: namespace serialization { Chris@16: template Chris@16: struct is_abstract : boost::false_type {}; Chris@16: } // namespace serialization Chris@16: } // namespace boost Chris@16: Chris@16: // define a macro to make explicit designation of this more transparent Chris@16: #define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T) \ Chris@16: namespace boost { \ Chris@16: namespace serialization { \ Chris@16: template<> \ Chris@16: struct is_abstract< T > : boost::true_type {}; \ Chris@16: template<> \ Chris@16: struct is_abstract< const T > : boost::true_type {}; \ Chris@16: }} \ Chris@16: /**/ Chris@16: Chris@16: #endif // BOOST_NO_IS_ABSTRACT Chris@16: Chris@16: #endif //BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP