Boost C++ Libraries: Ticket #8400: Serialization uses typeid in shared_ptr helper even when compileing without RTTI support https://svn.boost.org/trac10/ticket/8400 <p> The culprit is the shared_ptr helper stuff, which uses typeid, which fails without RTTI. </p> <p> boost::shared_ptr uses boost::detail::sp_typeinfo instead of std::type_info and BOOST_SP_TYPEID instead of typeid, which also work without RTTI. </p> <p> If there are no unintended side effects, they should probably also be used by boost::serialization. </p> <p> Patch attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8400 Trac 1.4.3 Mika Fischer <mika.fischer@…> Fri, 05 Apr 2013 08:09:54 GMT attachment set https://svn.boost.org/trac10/ticket/8400 https://svn.boost.org/trac10/ticket/8400 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-serialization-shared_ptr-no-rtti.patch</span> </li> </ul> Ticket Robert Ramey Wed, 21 Aug 2013 16:11:04 GMT <link>https://svn.boost.org/trac10/ticket/8400#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:1</guid> <description> <p> Hmmmm - this actually requires some careful thought. The serialization library uses the concept of "no typeid" as an indicator that there is no such facility and some other type id facility has been provided. Shared ptr implements its own typeid facility. So depending upon the implementation detail in shared_ptr raises questions about what it is we really want. Naturally I'm reluctant to spend time on this question at this point. I was even considering just dropping the old shared_ptr implementation. </p> <p> Does the current situation cause any problems? </p> </description> <category>Ticket</category> </item> <item> <author>Mika Fischer <mika.fischer@…></author> <pubDate>Mon, 26 Aug 2013 11:24:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8400#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:2</guid> <description> <p> Well, it does prevent the use of boost::serialization with boost::shared_ptr when compiling without RTTI. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 30 Oct 2013 04:06:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8400#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:3</guid> <description> <p> hmm - do you have to use version 1.32? can't you use a later version? Wouldn't this fix the problem? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Tue, 04 Feb 2014 01:33:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8400#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:4</guid> <description> <p> Another question: </p> <p> You've submitted patch for boost/serialization/detail/shared_count_132.hpp - are you still using this header? It applies to an implementation over 20 years old! Does current code actually use this? What would happen if I just dropped this header? </p> <p> Robert Ramey. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Tue, 18 Feb 2014 17:42:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8400#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:5</guid> <description> <p> Note: I've update the shared_ptr_helper implementation. You can try this. BUT the shared_*132 hasn't changed. Please try using the latest version of shared_ptr serialization (NOT *132) and report back. If I don't get more feedback I'll have to close this ticket. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <author>Mika Fischer <mika.fischer@…></author> <pubDate>Tue, 18 Feb 2014 18:03:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8400#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:6</guid> <description> <p> I don't use that old version. But it seems to me that every archive includes boost/archive/shared_ptr_helper.hpp which in turn includes boost/serialization/shared_ptr_132.hpp which in turn includes boost/serialization/detail/shared_ptr_132.hpp </p> <p> So as far as I can tell, there is just no way to avoid including this header. And including it is all that's needed for the compiler to freak out because of the use of typeid etc. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 19 Feb 2014 19:25:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8400#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:7</guid> <description> <p> I've made some changes which I think will address this. </p> <p> a) a newer version of shared_ptr_helper.hpp - moved to include/serialization b) I've changed things so that *132.hpp files aren't included - not yet checked in but stay tuned. </p> <p> I think these changes may address your symptom here. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sat, 22 Mar 2014 05:38:51 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8400#comment:8 https://svn.boost.org/trac10/ticket/8400#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket Mika Fischer <mika.fischer@…> Wed, 30 Jul 2014 12:22:53 GMT <link>https://svn.boost.org/trac10/ticket/8400#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8400#comment:9</guid> <description> <p> Your change probably fixed this problem. Unfortunalety however, the restructurization caused other issues when RTTI is disabled. I've opened a new bug for the new issue: <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/10280"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/10280</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>