|
Boost-Commit : |
From: ramey_at_[hidden]
Date: 2008-06-07 19:40:45
Author: ramey
Date: 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
New Revision: 46221
URL: http://svn.boost.org/trac/boost/changeset/46221
Log:
miscellaneous adjustments in to address trunk test failures
Added:
trunk/boost/serialization/assume_abstract.hpp
- copied, changed from r44111, /trunk/boost/serialization/is_abstract.hpp
Removed:
trunk/boost/serialization/is_abstract.hpp
Text files modified:
trunk/boost/serialization/assume_abstract.hpp | 4 +++-
trunk/boost/serialization/collection_traits.hpp | 1 +
trunk/boost/serialization/config.hpp | 6 ++++++
trunk/boost/serialization/detail/shared_count_132.hpp | 19 +++++++------------
trunk/boost/serialization/detail/shared_ptr_132.hpp | 2 +-
trunk/boost/serialization/export.hpp | 8 ++++----
trunk/boost/serialization/shared_ptr_132.hpp | 11 +++++------
7 files changed, 27 insertions(+), 24 deletions(-)
Copied: trunk/boost/serialization/assume_abstract.hpp (from r44111, /trunk/boost/serialization/is_abstract.hpp)
==============================================================================
--- /trunk/boost/serialization/is_abstract.hpp (original)
+++ trunk/boost/serialization/assume_abstract.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -48,7 +48,9 @@
namespace boost { \
namespace serialization { \
template<> \
-struct is_abstract<const T > : boost::true_type {}; \
+struct is_abstract< T > : boost::true_type {}; \
+template<> \
+struct is_abstract< const T > : boost::true_type {}; \
}} \
/**/
Modified: trunk/boost/serialization/collection_traits.hpp
==============================================================================
--- trunk/boost/serialization/collection_traits.hpp (original)
+++ trunk/boost/serialization/collection_traits.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -27,6 +27,7 @@
#include <boost/mpl/integral_c_tag.hpp>
#include <boost/cstdint.hpp>
+#include <climits> // ULONG_MAX
#include <boost/serialization/level.hpp>
#define BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(T, C) \
Modified: trunk/boost/serialization/config.hpp
==============================================================================
--- trunk/boost/serialization/config.hpp (original)
+++ trunk/boost/serialization/config.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -69,6 +69,12 @@
//
#define BOOST_LIB_NAME boost_serialization
//
+ // If we're importing code from a dll, then tell auto_link.hpp about it:
+ //
+ #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
+ # define BOOST_DYN_LINK
+ #endif
+ //
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
Modified: trunk/boost/serialization/detail/shared_count_132.hpp
==============================================================================
--- trunk/boost/serialization/detail/shared_count_132.hpp (original)
+++ trunk/boost/serialization/detail/shared_count_132.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -45,10 +45,6 @@
namespace boost_132 {
-#if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) )
-using namespace boost;
-#endif
-
// Debug hooks
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
@@ -87,19 +83,12 @@
#endif
namespace detail{
-#if !BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) )
-using namespace boost::detail;
-#endif
class sp_counted_base
{
//private:
-#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) )
typedef boost::detail::lightweight_mutex mutex_type;
-#else
- typedef detail::lightweight_mutex mutex_type;
-#endif
public:
@@ -372,7 +361,11 @@
// auto_ptr<Y> is special cased to provide the strong guarantee
template<class Y>
- explicit shared_count(std::auto_ptr<Y> & r): pi_(new sp_counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>()))
+ explicit shared_count(std::auto_ptr<Y> & r): pi_(
+ new sp_counted_base_impl<
+ Y *,
+ boost::checked_deleter<Y>
+ >(r.get(), boost::checked_deleter<Y>()))
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(shared_count_id)
#endif
@@ -559,6 +552,8 @@
} // namespace boost
+BOOST_SERIALIZATION_ASSUME_ABSTRACT(boost_132::detail::sp_counted_base)
+
#ifdef __BORLANDC__
# pragma warn .8027 // Functions containing try are not expanded inline
# pragma warn .8026 // Functions with excep. spec. are not expanded inline
Modified: trunk/boost/serialization/detail/shared_ptr_132.hpp
==============================================================================
--- trunk/boost/serialization/detail/shared_ptr_132.hpp (original)
+++ trunk/boost/serialization/detail/shared_ptr_132.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -118,7 +118,7 @@
typedef T element_type;
typedef T value_type;
typedef T * pointer;
- typedef typename detail::shared_ptr_traits<T>::reference reference;
+ typedef BOOST_DEDUCED_TYPENAME detail::shared_ptr_traits<T>::reference reference;
shared_ptr(): px(0), pn() // never throws in 1.30+
{
Modified: trunk/boost/serialization/export.hpp
==============================================================================
--- trunk/boost/serialization/export.hpp (original)
+++ trunk/boost/serialization/export.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -33,7 +33,7 @@
#include <boost/serialization/extended_type_info_typeid.hpp>
#endif
#include <boost/serialization/type_info_implementation.hpp>
-#include <boost/serialization/is_abstract.hpp>
+#include <boost/serialization/assume_abstract.hpp>
#include <boost/serialization/force_include.hpp>
#include <boost/serialization/singleton.hpp>
@@ -62,14 +62,14 @@
{
static const basic_pointer_iserializer &
enable_load(mpl::true_){
- return boost::serialization::singleton<
+ return /* BOOST_DEDUCED_TYPENAME */ boost::serialization::singleton<
pointer_iserializer<Archive, Serializable>
>::get_const_instance();
}
static const basic_pointer_oserializer &
enable_save(mpl::true_){
- return boost::serialization::singleton<
+ return /* BOOST_DEDUCED_TYPENAME */ boost::serialization::singleton<
pointer_oserializer<Archive, Serializable>
>::get_const_instance();
}
@@ -90,7 +90,7 @@
# elif defined(__INTEL_COMPILER)
virtual BOOST_DLLEXPORT void instantiate() BOOST_USED;
# elif defined(__BORLANDC__)
- static void instantiate();
+ static BOOST_DLLEXPORT void instantiate();
enum { x = sizeof(instantiate(),3) };
# else
static void instantiate();
Deleted: trunk/boost/serialization/is_abstract.hpp
==============================================================================
--- trunk/boost/serialization/is_abstract.hpp 2008-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
+++ (empty file)
@@ -1,57 +0,0 @@
-#ifndef BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
-#define BOOST_SERIALIZATION_IS_ABSTRACT_CLASS_HPP
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// is_abstract_class.hpp:
-
-// (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.
-
-// 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 : boost::is_abstract<T> {} ;
-} // namespace serialization
-} // namespace boost
-
-#else
-// 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_SERIALIZATION_ASSUME_ABSTRACT(T) \
-namespace boost { \
-namespace serialization { \
-template<> \
-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-06-07 19:40:44 EDT (Sat, 07 Jun 2008)
@@ -24,16 +24,14 @@
#include <list>
-#include <boost/serialization/detail/shared_ptr_132.hpp>
-
-#include <boost/serialization/is_abstract.hpp>
+#include <boost/serialization/assume_abstract.hpp>
#include <boost/serialization/split_free.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/tracking.hpp>
#include <boost/serialization/void_cast.hpp>
// mark base class as an (uncreatable) base class
-BOOST_SERIALIZATION_ASSUME_ABSTRACT(boost_132::detail::sp_counted_base)
+#include <boost/serialization/detail/shared_ptr_132.hpp>
/////////////////////////////////////////////////////////////
// Maintain a couple of lists of loaded shared pointers of the old previous
@@ -77,8 +75,9 @@
template<class Archive, class P, class D>
inline void save_construct_data(
Archive & ar,
- const boost_132::detail::sp_counted_base_impl<P, D> *t,
- const unsigned int /* file_version */
+ const
+ boost_132::detail::sp_counted_base_impl<P, D> *t,
+ const BOOST_PFTO unsigned int /* file_version */
){
// variables used for construction
ar << boost::serialization::make_nvp("ptr", t->ptr);
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