Ticket #1711: weird.patch
File weird.patch, 2.0 KB (added by , 15 years ago) |
---|
-
boost/serialization/export.hpp
49 49 namespace archive { 50 50 namespace detail { 51 51 52 #ifdef BEFORE 52 53 class basic_pointer_iserializer; 53 54 class basic_pointer_oserializer; 54 55 … … 115 116 template<class T> 116 117 struct guid_initializer 117 118 { 118 const guid_initializer & export_guid(char const* key, mpl::false_){ 119 // generates the statically-initialized objects whose constructors 120 // register the information allowing serialization of T objects 121 // through pointers to their base classes. 122 instantiate_ptr_serialization((T*)0, 0); 123 return *this; 124 } 119 const guid_initializer & export_guid(char const* key, mpl::false_); 120 125 121 const guid_initializer & export_guid(char const* key, mpl::true_){ 126 122 return *this; 127 123 } … … 140 136 } 141 137 }; 142 138 139 #else 140 141 // WORKS IF THIS DEFINITION IS AFTER INCLUDING THE ARCHIVE HEADERS 142 // HUH? 143 template<typename T> 144 const guid_initializer<T> & 145 guid_initializer<T>::export_guid(char const * key, mpl::false_) 146 { 147 instantiate_ptr_serialization((T*)0,0); 148 return *this; 149 } 150 151 #endif 152 143 153 } // namespace detail 144 154 } // namespace archive 145 155 } // namespace boost -
libs/serialization/test/test_exported.cpp
18 18 } 19 19 #endif 20 20 21 #define BEFORE 22 #include <boost/serialization/export.hpp> 23 #undef BEFORE 24 25 #include "text_archive.hpp" 26 27 #undef BOOST_SERIALIZATION_EXPORT_HPP 28 #include <boost/serialization/export.hpp> 29 30 21 31 #include <boost/serialization/base_object.hpp> 22 32 #include <boost/serialization/type_info_implementation.hpp> 23 33 #include <boost/archive/archive_exception.hpp> 24 34 #include "test_tools.hpp" 25 #include <boost/serialization/export.hpp>26 35 27 36 #include "base.hpp" 28 37