|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57987 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2009-11-27 17:32:28
Author: ramey
Date: 2009-11-27 17:32:28 EST (Fri, 27 Nov 2009)
New Revision: 57987
URL: http://svn.boost.org/trac/boost/changeset/57987
Log:
fixed BOOST_STATIC_WARNING implementation macro name conflict
Text files modified:
trunk/boost/serialization/access.hpp | 9 +++++++++
trunk/boost/serialization/static_warning.hpp | 12 ++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
Modified: trunk/boost/serialization/access.hpp
==============================================================================
--- trunk/boost/serialization/access.hpp (original)
+++ trunk/boost/serialization/access.hpp 2009-11-27 17:32:28 EST (Fri, 27 Nov 2009)
@@ -106,6 +106,15 @@
T & t,
const unsigned int file_version
){
+ // note: if you get a compile time error here with a
+ // message something like:
+ // cannot convert parameter 1 from <file type 1> to <file type 2 &>
+ // a likely possible cause is that the class T contains a
+ // serialize function - but that serialize function isn't
+ // a template and corresponds to a file type different than
+ // the class Archive. To resolve this, don't include an
+ // archive type other than that for which the serialization
+ // function is defined!!!
t.serialize(ar, file_version);
}
template<class T>
Modified: trunk/boost/serialization/static_warning.hpp
==============================================================================
--- trunk/boost/serialization/static_warning.hpp (original)
+++ trunk/boost/serialization/static_warning.hpp 2009-11-27 17:32:28 EST (Fri, 27 Nov 2009)
@@ -77,7 +77,7 @@
namespace serialization {
template<int L>
-struct STATIC_WARNING_LINE{};
+struct BOOST_SERIALIZATION_STATIC_WARNING_LINE{};
template<bool B, int L>
struct static_warning_test{
@@ -86,23 +86,23 @@
boost::mpl::true_,
typename boost::mpl::identity<
boost::mpl::print<
- STATIC_WARNING_LINE<L>
+ BOOST_SERIALIZATION_STATIC_WARNING_LINE<L>
>
>
>::type type;
};
template<int i>
-struct SS {};
+struct BOOST_SERIALIZATION_SS {};
} // serialization
} // boost
-#define BSW(B, L) \
- typedef boost::serialization::SS< \
+#define BOOST_SERIALIZATION_BSW(B, L) \
+ typedef boost::serialization::BOOST_SERIALIZATION_SS< \
sizeof( boost::serialization::static_warning_test< B, L > ) \
> BOOST_JOIN(STATIC_WARNING_LINE, L);
-#define BOOST_STATIC_WARNING(B) BSW(B, __LINE__)
+#define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__)
#endif // BOOST_SERIALIZATION_STATIC_WARNING_HPP
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