|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58505 - trunk/boost/serialization
From: ramey_at_[hidden]
Date: 2009-12-23 02:20:50
Author: ramey
Date: 2009-12-23 02:20:49 EST (Wed, 23 Dec 2009)
New Revision: 58505
URL: http://svn.boost.org/trac/boost/changeset/58505
Log:
Fix plugin test/demo
Text files modified:
trunk/boost/serialization/extended_type_info_no_rtti.hpp | 11 ++++++-----
trunk/boost/serialization/extended_type_info_typeid.hpp | 10 +++++-----
trunk/boost/serialization/factory.hpp | 10 +++++++++-
3 files changed, 20 insertions(+), 11 deletions(-)
Modified: trunk/boost/serialization/extended_type_info_no_rtti.hpp
==============================================================================
--- trunk/boost/serialization/extended_type_info_no_rtti.hpp (original)
+++ trunk/boost/serialization/extended_type_info_no_rtti.hpp 2009-12-23 02:20:49 EST (Wed, 23 Dec 2009)
@@ -24,6 +24,7 @@
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_polymorphic.hpp>
+#include <boost/type_traits/remove_const.hpp>
#include <boost/serialization/static_warning.hpp>
#include <boost/serialization/singleton.hpp>
@@ -128,15 +129,15 @@
va_start(ap, count);
switch(count){
case 0:
- return factory<T, 0>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 0>(ap);
case 1:
- return factory<T, 1>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 1>(ap);
case 2:
- return factory<T, 2>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 2>(ap);
case 3:
- return factory<T, 3>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 3>(ap);
case 4:
- return factory<T, 4>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 4>(ap);
default:
assert(false); // too many arguments
// throw exception here?
Modified: trunk/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- trunk/boost/serialization/extended_type_info_typeid.hpp (original)
+++ trunk/boost/serialization/extended_type_info_typeid.hpp 2009-12-23 02:20:49 EST (Wed, 23 Dec 2009)
@@ -113,15 +113,15 @@
va_start(ap, count);
switch(count){
case 0:
- return factory<boost::remove_const<T>, 0>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 0>(ap);
case 1:
- return factory<boost::remove_const<T>, 1>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 1>(ap);
case 2:
- return factory<boost::remove_const<T>, 2>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 2>(ap);
case 3:
- return factory<boost::remove_const<T>, 3>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 3>(ap);
case 4:
- return factory<boost::remove_const<T>, 4>(ap);
+ return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 4>(ap);
default:
assert(false); // too many arguments
// throw exception here?
Modified: trunk/boost/serialization/factory.hpp
==============================================================================
--- trunk/boost/serialization/factory.hpp (original)
+++ trunk/boost/serialization/factory.hpp 2009-12-23 02:20:49 EST (Wed, 23 Dec 2009)
@@ -88,6 +88,14 @@
BOOST_SERIALIZATION_FACTORY(1, T, A0, 0, 0, 0)
#define BOOST_SERIALIZATION_FACTORY_0(T) \
- BOOST_SERIALIZATION_FACTORY(0, T, 0, 0, 0, 0)
+namespace boost { \
+namespace serialization { \
+ template<> \
+ T * factory<T, 0>(std::va_list){ \
+ return new T(); \
+ } \
+} \
+} \
+/**/
#endif // BOOST_SERIALIZATION_FACTORY_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