|
Boost-Commit : |
From: ramey_at_[hidden]
Date: 2008-04-06 16:01:49
Author: ramey
Date: 2008-04-06 16:01:48 EDT (Sun, 06 Apr 2008)
New Revision: 44078
URL: http://svn.boost.org/trac/boost/changeset/44078
Log:
change BOOST_IS_ABSTRACT to BOOST_ASSUME_ABSTRACT
Text files modified:
trunk/boost/archive/detail/iserializer.hpp | 2 +-
trunk/boost/archive/detail/oserializer.hpp | 2 +-
trunk/boost/serialization/export.hpp | 4 ++--
trunk/boost/serialization/is_abstract.hpp | 34 +++++++++++++++++++++++-----------
trunk/boost/serialization/shared_ptr_132.hpp | 2 +-
5 files changed, 28 insertions(+), 16 deletions(-)
Modified: trunk/boost/archive/detail/iserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/iserializer.hpp (original)
+++ trunk/boost/archive/detail/iserializer.hpp 2008-04-06 16:01:48 EDT (Sun, 06 Apr 2008)
@@ -418,7 +418,7 @@
// virtual serialize functions used for plug-ins
typedef BOOST_DEDUCED_TYPENAME
mpl::eval_if<
- serialization::is_abstract<const T>,
+ boost::serialization::is_abstract<const T>,
mpl::identity<abstract<T> >,
mpl::identity<non_abstract<T> >
>::type typex;
Modified: trunk/boost/archive/detail/oserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/oserializer.hpp (original)
+++ trunk/boost/archive/detail/oserializer.hpp 2008-04-06 16:01:48 EDT (Sun, 06 Apr 2008)
@@ -321,7 +321,7 @@
// virtual serialize functions used for plug-ins
typedef
BOOST_DEDUCED_TYPENAME mpl::eval_if<
- serialization::is_abstract<T>,
+ boost::serialization::is_abstract<T>,
mpl::identity<abstract<T> >,
mpl::identity<non_abstract<T> >
>::type typex;
Modified: trunk/boost/serialization/export.hpp
==============================================================================
--- trunk/boost/serialization/export.hpp (original)
+++ trunk/boost/serialization/export.hpp 2008-04-06 16:01:48 EDT (Sun, 06 Apr 2008)
@@ -135,8 +135,8 @@
// note: exporting an abstract base class will have no effect
// and cannot be used to instantitiate serialization code
// (one might be using this in a DLL to instantiate code)
- //BOOST_STATIC_WARNING(! boost::is_abstract<T>::value);
- return export_guid(key, serialization::is_abstract<T>());
+ //BOOST_STATIC_WARNING(! boost::serialization::is_abstract<T>::value);
+ return export_guid(key, boost::serialization::is_abstract<T>());
}
};
Modified: trunk/boost/serialization/is_abstract.hpp
==============================================================================
--- trunk/boost/serialization/is_abstract.hpp (original)
+++ trunk/boost/serialization/is_abstract.hpp 2008-04-06 16:01:48 EDT (Sun, 06 Apr 2008)
@@ -9,37 +9,49 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// is_abstract_class.hpp:
-// (C) Copyright 2002 Rani Sharoni (rani_sharoni_at_[hidden]) and Robert Ramey
+// (C) Copyright 2008 Robert Ramey
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
-#include <boost/config.hpp>
-#include <boost/mpl/bool.hpp>
+// this is useful for compilers which don't support the boost::is_abstract
+
#include <boost/type_traits/is_abstract.hpp>
+#ifndef BOOST_NO_IS_ABSTRACT
+
+// if there is an intrinsic is_abstract defined, we don't have to do anything
+#define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T)
+
+// but forward to the "official" is_abstract
namespace boost {
namespace serialization {
template<class T>
- struct is_abstract
-#ifdef BOOST_NO_IS_ABSTRACT
- : mpl::false_
+ struct is_abstract : boost::is_abstract<T> {} ;
+} // namespace serialization
+} // namespace boost
+
#else
- : boost::is_abstract<T>
-#endif
- {};
+// we have to "make" one
+
+namespace boost {
+namespace serialization {
+ template<class T>
+ struct is_abstract : boost::false_type {};
} // namespace serialization
} // namespace boost
// define a macro to make explicit designation of this more transparent
-#define BOOST_IS_ABSTRACT(T) \
+#define BOOST_SERIALIZATION_ASSUME_ABSTRACT(T) \
namespace boost { \
namespace serialization { \
template<> \
-struct is_abstract<const T > : mpl::true_ {}; \
+struct is_abstract<const T > : boost::true_type {}; \
}} \
/**/
+#endif // BOOST_NO_IS_ABSTRACT
+
#endif //BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
Modified: trunk/boost/serialization/shared_ptr_132.hpp
==============================================================================
--- trunk/boost/serialization/shared_ptr_132.hpp (original)
+++ trunk/boost/serialization/shared_ptr_132.hpp 2008-04-06 16:01:48 EDT (Sun, 06 Apr 2008)
@@ -33,7 +33,7 @@
#include <boost/serialization/void_cast.hpp>
// mark base class as an (uncreatable) base class
-BOOST_IS_ABSTRACT(boost_132::detail::sp_counted_base)
+BOOST_SERIALIZATION_ASSUME_ABSTRACT(boost_132::detail::sp_counted_base)
/////////////////////////////////////////////////////////////
// Maintain a couple of lists of loaded shared pointers of the old previous
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk