Ticket #2291: changeset_r43949_backport.patch
File changeset_r43949_backport.patch, 2.2 KB (added by , 14 years ago) |
---|
-
boost/serialization/export.hpp
98 98 // generates the statically-initialized objects whose constructors 99 99 // register the information allowing serialization of T objects 100 100 // through pointers to their base classes. 101 instantiate_ptr_serialization((T*)0, 0 );101 instantiate_ptr_serialization((T*)0, 0, adl_tag()); 102 102 } 103 103 104 104 // On many platforms, naming a specialization of this template is -
boost/archive/detail/register_archive.hpp
8 8 9 9 namespace boost { namespace archive { namespace detail { 10 10 11 // This is for the sake of GCC 4.1 et. al, which doesn't seem to see 12 // the instantiate_ptr_serialization overloads generated by 13 // BOOST_SERIALIZATION_REGISTER_ARCHIVE if they lexically follow the 14 // call *unless* they are in an associated namespace of one of the 15 // arguments. I am not 100% sure of what the standard says on this 16 // point, and am investigating. - Dave A. 17 struct adl_tag {}; 18 11 19 template <class Archive, class Serializable> 12 20 struct ptr_serialization_support; 13 21 … … 26 34 // in overload resolution with the functions declared by 27 35 // BOOST_SERIALIZATION_REGISTER_ARCHIVE, below. 28 36 template <class Serializable> 29 void instantiate_ptr_serialization(Serializable*, int ) {}37 void instantiate_ptr_serialization(Serializable*, int, adl_tag) {} 30 38 31 39 // The function declaration generated by this macro never actually 32 40 // gets called, but its return type gets instantiated, and that's … … 38 46 \ 39 47 template <class Serializable> \ 40 48 typename _ptr_serialization_support<Archive, Serializable>::type \ 41 instantiate_ptr_serialization( Serializable*, Archive* );\49 instantiate_ptr_serialization( Serializable*, Archive*, adl_tag ); \ 42 50 \ 43 51 }}} 44 52