Boost C++ Libraries: Ticket #961: boost::basic_binary_oprimitive not instantiated correctly https://svn.boost.org/trac10/ticket/961 <pre class="wiki">template&lt;class Archive, class Elem, class Tr&gt; BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_oprimitive&lt;Archive, Elem, Tr&gt;::save(const std::wstring &amp;ws); template&lt;class Archive, class Elem, class Tr&gt; BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iprimitive&lt;Archive, Elem, Tr&gt;::load(std::wstring &amp; ws); </pre><p> are not instantiated for <code>boost::binary_oarchive</code> and <code>boost:binary_iarchive</code> (<code>wchar</code> functions for <code>char</code> archives). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/961 Trac 1.4.3 Thomas Witt Fri, 01 Jun 2007 16:55:32 GMT milestone changed; severity set https://svn.boost.org/trac10/ticket/961#comment:1 https://svn.boost.org/trac10/ticket/961#comment:1 <ul> <li><strong>severity</strong> → <span class="trac-field-new">Showstopper</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.34.1</span> → <span class="trac-field-new">Boost 1.35.0</span> </li> </ul> <p> Changed milestone to 1.35.0 per request from Robert Ramey. </p> Ticket Dave Abrahams Wed, 11 Jul 2007 01:08:03 GMT owner set https://svn.boost.org/trac10/ticket/961#comment:2 https://svn.boost.org/trac10/ticket/961#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> </ul> Ticket theta682@… Tue, 20 Nov 2007 18:01:52 GMT <link>https://svn.boost.org/trac10/ticket/961#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/961#comment:3</guid> <description> <p> Any news? Will it be fixed in 1.35.0? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 30 Nov 2007 02:16:31 GMT</pubDate> <title>status, severity changed https://svn.boost.org/trac10/ticket/961#comment:4 https://svn.boost.org/trac10/ticket/961#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> Hmmm - these are implemented as primitives in basic_binary_?primitive.hpp (iff the compiler supports wide character strings). Derived classes forward to there so I can't see where there should be a problem. </p> Ticket theta682@… Fri, 30 Nov 2007 08:33:07 GMT <link>https://svn.boost.org/trac10/ticket/961#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/961#comment:5</guid> <description> <p> There are template functions for wchar_t, but they are not instantiated implicitly. I have to apply this patch: </p> <p> Index: C:/Projects/contrib/boost-1.34.1/libs/serialization/src/binary_iarchive.cpp =================================================================== --- C:/Projects/contrib/boost-1.34.1/libs/serialization/src/binary_iarchive.cpp (revision 33976) +++ C:/Projects/contrib/boost-1.34.1/libs/serialization/src/binary_iarchive.cpp (revision 33977) @@ -26,6 +26,11 @@ </p> <blockquote> <p> char, std::char_traits&lt;char&gt; </p> <blockquote class="citation"> <p> ; </p> </blockquote> </blockquote> <p> +#ifndef BOOST_NO_STD_WSTRING +template&lt;class Archive, class Elem, class Tr&gt; +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_iprimitive&lt;Archive, Elem, Tr&gt;::load(std::wstring &amp; ws); +#endif </p> <blockquote> <p> template class basic_binary_iarchive&lt;binary_iarchive&gt; ; template class binary_iarchive_impl&lt; </p> <blockquote> <p> binary_iarchive, </p> </blockquote> </blockquote> <p> Index: C:/Projects/contrib/boost-1.34.1/libs/serialization/src/binary_oarchive.cpp =================================================================== --- C:/Projects/contrib/boost-1.34.1/libs/serialization/src/binary_oarchive.cpp (revision 33976) +++ C:/Projects/contrib/boost-1.34.1/libs/serialization/src/binary_oarchive.cpp (revision 33977) @@ -26,6 +26,16 @@ </p> <blockquote> <p> char, std::char_traits&lt;char&gt; </p> <blockquote class="citation"> <p> ; </p> </blockquote> </blockquote> <p> +#ifndef BOOST_NO_CWCHAR +template&lt;class Archive, class Elem, class Tr&gt; +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive&lt;Archive, Elem, Tr&gt;::save(const wchar_t * ws); +#ifndef BOOST_NO_STD_WSTRING +template&lt;class Archive, class Elem, class Tr&gt; +BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) +basic_binary_oprimitive&lt;Archive, Elem, Tr&gt;::save(const std::wstring &amp;ws); +#endif +#endif </p> <blockquote> <p> template class basic_binary_oarchive&lt;binary_oarchive&gt; ; template class binary_oarchive_impl&lt; </p> <blockquote> <p> binary_oarchive, </p> </blockquote> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 30 Nov 2007 18:20:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/961#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/961#comment:6</guid> <description> <p> a) I check the code and don't see why this should be necessary b) The serialization tests serialize wstring. See libs/serialization/test/A.hpp c) send me a small test case which should link but doesn't </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sun, 02 Dec 2007 06:17:02 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/961#comment:7 https://svn.boost.org/trac10/ticket/961#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> Ticket