Boost C++ Libraries: Ticket #4652: is_wrapper<std::string> assertion failed in xml_archive case https://svn.boost.org/trac10/ticket/4652 <p> When I serialize a class that includes std::string non intrusively, below error occurred. </p> <p> 'boost::mpl::assertion_failed' : Cannot convert 1st argument 'boost::mpl::failed <strong></strong><strong></strong><strong></strong>boost::serialization::is_wrapper&lt;T&gt;::* <strong></strong><strong></strong><strong>*' to 'boost::mpl::assert&lt;false&gt;::type'. </strong></p> <p> T=const std::string </p> <p> The error occurs only when I use the xml_archive. The text_archive has no problem. </p> <p> I tried to fix my code. And I add below code. </p> <pre class="wiki">BOOST_CLASS_IS_WRAPPER(std::string) </pre><p> The error doesn't occur. </p> <p> But I don't understand why should I use this macro. I guess it should care in the serialization library. </p> <p> I attached the simple example to reproduce this problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4652 Trac 1.4.3 kondo@… Thu, 16 Sep 2010 04:32:42 GMT attachment set https://svn.boost.org/trac10/ticket/4652 https://svn.boost.org/trac10/ticket/4652 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">str_wrap_err.cpp</span> </li> </ul> Ticket kondo@… Thu, 16 Sep 2010 07:15:19 GMT <link>https://svn.boost.org/trac10/ticket/4652#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4652#comment:1</guid> <description> <p> Sorry, I made a very easy mistake. </p> <p> I forgot BOOST_SERIALIZATION_NVP at str_wrap_err.cpp(27). </p> <p> After fixing my code, The error doesn't occur. </p> <p> Before </p> <pre class="wiki"> ar &amp; ms.s_; </pre><p> After </p> <pre class="wiki"> ar &amp; BOOST_SERIALIZATION_NVP(ms.s_); </pre><p> Please change the ticket status to invalid. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 16 Sep 2010 15:18:31 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4652#comment:2 https://svn.boost.org/trac10/ticket/4652#comment:2 <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">invalid</span> </li> </ul> Ticket