Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2008-06-29 18:18:48


Author: ramey
Date: 2008-06-29 18:18:47 EDT (Sun, 29 Jun 2008)
New Revision: 46874
URL: http://svn.boost.org/trac/boost/changeset/46874

Log:
tweaks to accomodate borland quirks
Text files modified:
   trunk/boost/archive/detail/oserializer.hpp | 10 ++++++++--
   trunk/boost/serialization/export.hpp | 12 +++++++++---
   trunk/boost/serialization/vector.hpp | 4 ++--
   3 files changed, 19 insertions(+), 7 deletions(-)

Modified: trunk/boost/archive/detail/oserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/oserializer.hpp (original)
+++ trunk/boost/archive/detail/oserializer.hpp 2008-06-29 18:18:47 EDT (Sun, 29 Jun 2008)
@@ -353,8 +353,14 @@
             T & t
         ){
             BOOST_DEDUCED_TYPENAME
- boost::serialization::type_info_implementation<T>::type
- const & i = boost::serialization::type_info_implementation<T>::type
+ // Borland complains if "const" is applied to something that
+ // is already "const"
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560))
+ const boost::serialization::type_info_implementation<T>::type
+ #else
+ boost::serialization::type_info_implementation<T>::type const
+ #endif
+ & i = boost::serialization::type_info_implementation<T>::type
                     ::get_const_instance();
 
             boost::serialization::extended_type_info const * const this_type = & i;

Modified: trunk/boost/serialization/export.hpp
==============================================================================
--- trunk/boost/serialization/export.hpp (original)
+++ trunk/boost/serialization/export.hpp 2008-06-29 18:18:47 EDT (Sun, 29 Jun 2008)
@@ -104,18 +104,24 @@
 ptr_serialization_support<Archive,Serializable>::instantiate()
 {
     export_impl<Archive,Serializable>::enable_save(
- BOOST_DEDUCED_TYPENAME Archive::is_saving()
+ #if ! defined(__BORLANDC__)
+ BOOST_DEDUCED_TYPENAME
+ #endif
+ Archive::is_saving()
     );
 
     export_impl<Archive,Serializable>::enable_load(
- BOOST_DEDUCED_TYPENAME Archive::is_loading()
+ #if ! defined(__BORLANDC__)
+ BOOST_DEDUCED_TYPENAME
+ #endif
+ Archive::is_loading()
     );
 }
 
 template<class T>
 struct guid_initializer
 {
- const guid_initializer & export_guid(char const* key, mpl::false_){
+ const guid_initializer & export_guid(char const* /* key */, mpl::false_){
         // generates the statically-initialized objects whose constructors
         // register the information allowing serialization of T objects
         // through pointers to their base classes.

Modified: trunk/boost/serialization/vector.hpp
==============================================================================
--- trunk/boost/serialization/vector.hpp (original)
+++ trunk/boost/serialization/vector.hpp 2008-06-29 18:18:47 EDT (Sun, 29 Jun 2008)
@@ -110,7 +110,7 @@
     const std::vector<U, Allocator> &t,
     const unsigned int file_version
 ){
- save(ar,t,file_version, typename use_array_optimization<Archive>::template apply<U>::type());
+ save(ar,t,file_version, BOOST_DEDUCED_TYPENAME use_array_optimization<Archive>::template apply<U>::type());
 }
 
 template<class Archive, class U, class Allocator>
@@ -119,7 +119,7 @@
     std::vector<U, Allocator> &t,
     const unsigned int file_version
 ){
- load(ar,t,file_version, typename use_array_optimization<Archive>::template apply<U>::type());
+ load(ar,t,file_version, BOOST_DEDUCED_TYPENAME use_array_optimization<Archive>::template apply<U>::type());
 }
 
 // split non-intrusive serialization function member into separate


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