From: bangerth Date: Sat, 2 Oct 2010 03:45:50 +0000 (+0000) Subject: Work around a number of problems that cause warnings and/or errors. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf09ec7d833b52024a40c127fde6b8839cb7d9f;p=dealii-svn.git Work around a number of problems that cause warnings and/or errors. git-svn-id: https://svn.dealii.org/trunk@22231 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/contrib/boost/include/boost/archive/impl/archive_serializer_map.ipp b/deal.II/contrib/boost/include/boost/archive/impl/archive_serializer_map.ipp index f8e6ab5169..7f6a874cca 100644 --- a/deal.II/contrib/boost/include/boost/archive/impl/archive_serializer_map.ipp +++ b/deal.II/contrib/boost/include/boost/archive/impl/archive_serializer_map.ipp @@ -12,6 +12,9 @@ // implementation of basic_text_iprimitive overrides for the combination // of template parameters used to implement a text_iprimitive +#ifndef BOOST_HEADER_GUARD_ARCHIVE_SERIALIZER_MAP_IPP +#define BOOST_HEADER_GUARD_ARCHIVE_SERIALIZER_MAP_IPP + #include #include #include @@ -28,7 +31,7 @@ namespace detail { namespace { // anon template - class map : public basic_serializer_map + class map : public basic_serializer_map {}; } @@ -57,7 +60,7 @@ archive_serializer_map::erase(const basic_serializer * bs){ } template -BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_serializer *) +BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_serializer *) archive_serializer_map::find( const boost::serialization::extended_type_info & eti ) { @@ -69,3 +72,5 @@ archive_serializer_map::find( } // namespace detail } // namespace archive } // namespace boost + +#endif // BOOST_HEADER_GUARD_ARCHIVE_SERIALIZER_MAP_IPP diff --git a/deal.II/contrib/boost/include/boost/archive/iterators/remove_whitespace.hpp b/deal.II/contrib/boost/include/boost/archive/iterators/remove_whitespace.hpp index c5e581d99f..2ab3282254 100644 --- a/deal.II/contrib/boost/include/boost/archive/iterators/remove_whitespace.hpp +++ b/deal.II/contrib/boost/include/boost/archive/iterators/remove_whitespace.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // remove_whitespace.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002, 2010 Robert Ramey - http://www.rrsd.com . // 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) @@ -31,7 +31,7 @@ // here is the default standard implementation of the functor used // by the filter iterator to remove spaces. Unfortunately usage // of this implementation in combination with spirit trips a bug -// VC 6.5. The only way I can find to work around it is to +// VC 6.5. The only way I can find to work around it is to // implement a special non-standard version for this platform #ifndef BOOST_NO_CWCTYPE @@ -54,8 +54,6 @@ namespace std{ using ::isspace; } //#endif // BOOST_WORKAROUND -namespace { // anonymous - template struct remove_whitespace_predicate; @@ -77,12 +75,11 @@ struct remove_whitespace_predicate }; #endif -} // namespace anonymous /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // convert base64 file data (including whitespace and padding) to binary -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -130,15 +127,15 @@ public: m_full = false; ++(this->base_reference()); } - filter_iterator(Base start) : - super_t(start), + filter_iterator(Base start) : + super_t(start), m_full(false) {} filter_iterator(){} }; template -class remove_whitespace : +class remove_whitespace : public filter_iterator< remove_whitespace_predicate, Base @@ -157,7 +154,7 @@ public: super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast(start)))) {} // intel 7.1 doesn't like default copy constructor - remove_whitespace(const remove_whitespace & rhs) : + remove_whitespace(const remove_whitespace & rhs) : super_t(rhs.base_reference()) {} }; diff --git a/deal.II/contrib/boost/libs/serialization/src/basic_iarchive.cpp b/deal.II/contrib/boost/libs/serialization/src/basic_iarchive.cpp index 50da890cde..5edea5700b 100644 --- a/deal.II/contrib/boost/libs/serialization/src/basic_iarchive.cpp +++ b/deal.II/contrib/boost/libs/serialization/src/basic_iarchive.cpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_archive.cpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // 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) @@ -18,8 +18,8 @@ #include #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -68,10 +68,10 @@ class basic_iarchive_impl { loaded_as_pointer(false), class_id(class_id_) {} - aobject() : + aobject() : address(NULL), loaded_as_pointer(false), - class_id(-2) + class_id(-2) {} }; typedef std::vector object_id_vector_type; @@ -84,7 +84,7 @@ class basic_iarchive_impl { object_id_type moveable_objects_recent; void reset_object_address( - const void * new_address, + const void * new_address, const void *old_address ); @@ -97,11 +97,11 @@ class basic_iarchive_impl { cobject_type( std::size_t class_id, const basic_iserializer & bis - ) : + ) : m_bis(& bis), m_class_id(class_id) {} - cobject_type(const cobject_type & rhs) : + cobject_type(const cobject_type & rhs) : m_bis(rhs.m_bis), m_class_id(rhs.m_class_id) {} @@ -119,7 +119,7 @@ class basic_iarchive_impl { ////////////////////////////////////////////////////////////////////// // information about each serialized class indexed on class_id - class cobject_id + class cobject_id { public: cobject_id & operator=(const cobject_id & rhs){ @@ -143,7 +143,7 @@ class basic_iarchive_impl { tracking_level(track_never), initialized(false) {} - cobject_id(const cobject_id &rhs): + cobject_id(const cobject_id &rhs): bis_ptr(rhs.bis_ptr), bpis_ptr(rhs.bpis_ptr), file_version(rhs.file_version), @@ -211,7 +211,7 @@ class basic_iarchive_impl { ); const basic_pointer_iserializer * load_pointer( basic_iarchive & ar, - void * & t, + void * & t, const basic_pointer_iserializer * bpis, const basic_pointer_iserializer * (*finder)( const boost::serialization::extended_type_info & type @@ -220,9 +220,9 @@ class basic_iarchive_impl { ); }; -inline void +inline void basic_iarchive_impl::reset_object_address( - const void * new_address, + const void * new_address, const void *old_address ){ // this code handles a couple of situations. @@ -249,7 +249,7 @@ basic_iarchive_impl::reset_object_address( // but expected to work on all platforms in current usage if(object_id_vector[i].address > old_address){ std::size_t member_displacement - = reinterpret_cast(object_id_vector[i].address) + = reinterpret_cast(object_id_vector[i].address) - reinterpret_cast(old_address); object_id_vector[i].address = reinterpret_cast( reinterpret_cast(new_address) + member_displacement @@ -258,7 +258,7 @@ basic_iarchive_impl::reset_object_address( else{ std::size_t member_displacement = reinterpret_cast(old_address) - - reinterpret_cast(object_id_vector[i].address); + - reinterpret_cast(object_id_vector[i].address); object_id_vector[i].address = reinterpret_cast( reinterpret_cast(new_address) - member_displacement ); @@ -266,13 +266,13 @@ basic_iarchive_impl::reset_object_address( } } -inline void +inline void basic_iarchive_impl::delete_created_pointers() { object_id_vector_type::iterator i; for( i = object_id_vector.begin(); - i != object_id_vector.end(); + i != object_id_vector.end(); ++i ){ if(i->loaded_as_pointer){ @@ -280,7 +280,7 @@ basic_iarchive_impl::delete_created_pointers() const int j = i->class_id; const cobject_id & co = cobject_id_vector[j]; //const cobject_id & co = cobject_id_vector[i->class_id]; - // with the appropriate input serializer, + // with the appropriate input serializer, // delete the indicated object co.bis_ptr->destroy(i->address); } @@ -292,8 +292,8 @@ basic_iarchive_impl::register_type( const basic_iserializer & bis ){ assert( - cobject_info_set.size() - <= + class_id_type(cobject_info_set.size()) + <= boost::integer_traits::const_max ); class_id_type cid(static_cast( @@ -385,7 +385,7 @@ basic_iarchive_impl::load_object( this_id = object_id_vector.size(); // if we tracked this object when the archive was saved - if(tracking){ + if(tracking){ // if it was already read if(!track(ar, t)) // we're done @@ -419,8 +419,8 @@ basic_iarchive_impl::load_pointer( } assert( - cobject_info_set.size() - <= + class_id_type(cobject_info_set.size()) + <= boost::integer_traits::const_max ); // if its a new class type - i.e. never been registered @@ -488,8 +488,8 @@ basic_iarchive_impl::load_pointer( object_id_vector.push_back(aobject(t, cid)); bpis_ptr->load_object_ptr( - ar, - object_id_vector[ui].address, + ar, + object_id_vector[ui].address, co.file_version ); t = object_id_vector[ui].address; @@ -516,7 +516,7 @@ basic_iarchive::next_object_pointer(void *t){ } BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) -basic_iarchive::basic_iarchive(unsigned int flags) : +basic_iarchive::basic_iarchive(unsigned int flags) : pimpl(new basic_iarchive_impl(flags)) {} @@ -533,7 +533,7 @@ basic_iarchive::set_library_version(version_type archive_library_version){ BOOST_ARCHIVE_DECL(void) basic_iarchive::reset_object_address( - const void * new_address, + const void * new_address, const void * old_address ){ pimpl->reset_object_address(new_address, old_address); @@ -541,7 +541,7 @@ basic_iarchive::reset_object_address( BOOST_ARCHIVE_DECL(void) basic_iarchive::load_object( - void *t, + void *t, const basic_iserializer & bis ){ pimpl->load_object(*this, t, bis); @@ -550,7 +550,7 @@ basic_iarchive::load_object( // load a pointer object BOOST_ARCHIVE_DECL(const basic_pointer_iserializer *) basic_iarchive::load_pointer( - void * &t, + void * &t, const basic_pointer_iserializer * bpis_ptr, const basic_pointer_iserializer * (*finder)( const boost::serialization::extended_type_info & type_ @@ -571,12 +571,12 @@ basic_iarchive::delete_created_pointers() pimpl->delete_created_pointers(); } -BOOST_ARCHIVE_DECL(unsigned int) +BOOST_ARCHIVE_DECL(unsigned int) basic_iarchive::get_library_version() const{ return pimpl->m_archive_library_version; } -BOOST_ARCHIVE_DECL(unsigned int) +BOOST_ARCHIVE_DECL(unsigned int) basic_iarchive::get_flags() const{ return pimpl->m_flags; } diff --git a/deal.II/contrib/boost/libs/serialization/src/basic_oarchive.cpp b/deal.II/contrib/boost/libs/serialization/src/basic_oarchive.cpp index 21d4287c88..71c3c8ab80 100644 --- a/deal.II/contrib/boost/libs/serialization/src/basic_oarchive.cpp +++ b/deal.II/contrib/boost/libs/serialization/src/basic_oarchive.cpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_oarchive.cpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002, 2010 Robert Ramey - http://www.rrsd.com . // 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) @@ -118,7 +118,7 @@ class basic_oarchive_impl { // the following cannot be defined because of the const // member. This will generate a link error if an attempt // is made to assign. This should never be necessary - // use this only for lookup argument + // use this only for lookup argument cobject_type & operator=(const cobject_type &rhs); bool operator<(const cobject_type &rhs) const { return *m_bos_ptr < *(rhs.m_bos_ptr); @@ -145,7 +145,7 @@ class basic_oarchive_impl { const cobject_type & find(const basic_oserializer & bos); - const basic_oserializer * + const basic_oserializer * find(const serialization::extended_type_info &ti) const; //public: @@ -158,7 +158,7 @@ class basic_oarchive_impl { ); void save_pointer( basic_oarchive & ar, - const void * t, + const void * t, const basic_pointer_oserializer * bpos ); }; @@ -174,11 +174,11 @@ basic_oarchive_impl::find(const serialization::extended_type_info & ti) const { # pragma warning(push) # pragma warning(disable : 4511 4512) #endif - class bosarg : + class bosarg : public basic_oserializer { bool class_info() const { - assert(false); + assert(false); return false; } // returns true if objects should be tracked @@ -196,7 +196,7 @@ basic_oarchive_impl::find(const serialization::extended_type_info & ti) const { assert(false); return false; } - void save_object_data( + void save_object_data( basic_oarchive & /*ar*/, const void * /*x*/ ) const { assert(false); @@ -210,13 +210,13 @@ basic_oarchive_impl::find(const serialization::extended_type_info & ti) const { #pragma warning(pop) #endif bosarg bos(ti); - cobject_info_set_type::const_iterator cit + cobject_info_set_type::const_iterator cit = cobject_info_set.find(cobject_type(bos)); // it should already have been "registered" - see below if(cit == cobject_info_set.end()){ // if an entry is not found in the table it is because a pointer // of a derived class has been serialized through its base class - // but the derived class hasn't been "registered" + // but the derived class hasn't been "registered" return NULL; } // return pointer to the real class @@ -227,11 +227,11 @@ inline const basic_oarchive_impl::cobject_type & basic_oarchive_impl::find(const basic_oserializer & bos) { assert( - cobject_info_set.size() - <= + class_id_type(cobject_info_set.size()) + <= boost::integer_traits::const_max ); - std::pair cresult = + std::pair cresult = cobject_info_set.insert(cobject_type(cobject_info_set.size(), bos)); return *(cresult.first); } @@ -241,8 +241,8 @@ basic_oarchive_impl::register_type( const basic_oserializer & bos ){ assert( - cobject_info_set.size() - <= + class_id_type(cobject_info_set.size()) + <= boost::integer_traits::const_max ); cobject_type co(cobject_info_set.size(), bos); @@ -321,7 +321,7 @@ basic_oarchive_impl::save_object( inline void basic_oarchive_impl::save_pointer( basic_oarchive & ar, - const void * t, + const void * t, const basic_pointer_oserializer * bpos_ptr ){ const basic_oserializer & bos = bpos_ptr->get_basic_serializer(); @@ -329,7 +329,7 @@ basic_oarchive_impl::save_pointer( const cobject_type & co = register_type(bos); if(! co.m_initialized){ ar.vsave(co.m_class_id); - // if its a previously unregistered class + // if its a previously unregistered class if((cobject_info_set.size() > original_count)){ if(bos.is_polymorphic()){ const serialization::extended_type_info *eti = & bos.get_eti(); @@ -414,34 +414,34 @@ namespace boost { namespace archive { namespace detail { -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive::basic_oarchive(unsigned int flags) : pimpl(new basic_oarchive_impl(flags)) {} -BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) +BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive::~basic_oarchive() { delete pimpl; } -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL(void) basic_oarchive::save_object( - const void *x, + const void *x, const basic_oserializer & bos ){ pimpl->save_object(*this, x, bos); } -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL(void) basic_oarchive::save_pointer( - const void * t, + const void * t, const basic_pointer_oserializer * bpos_ptr ){ pimpl->save_pointer(*this, t, bpos_ptr); } -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL(void) basic_oarchive::register_basic_serializer(const basic_oserializer & bos){ pimpl->register_type(bos); } @@ -456,7 +456,7 @@ basic_oarchive::get_flags() const{ return pimpl->m_flags; } -BOOST_ARCHIVE_DECL(void) +BOOST_ARCHIVE_DECL(void) basic_oarchive::end_preamble(){ }