Boost C++ Libraries: Ticket #1824: serialization keeps using wchar_t if BOOST_NO_STD_WSTRING is set https://svn.boost.org/trac10/ticket/1824 <p> I was for some reason compiling boost with an individual user.hpp that defines <br /> #define BOOST_NO_STD_WSTRING<br /> #define BOOST_DATE_TIME_NO_LOCALE<br /> </p> <p> My config is Sparc Solaris target 32bit Gcc 3.3.2 gcc-Stl --without-icu<br /> # Compiler configuration<br /> using gcc : : : &lt;cflags&gt;"-mcpu=v9" </p> <blockquote> <p> &lt;cxxflags&gt;"-mcpu=v9 -DBOOST_USER_CONFIG=<br />\"boost/config/user_ohne_wchar_t.hpp<br />\"" </p> </blockquote> <blockquote> <p> &lt;linkflags&gt;"-mcpu=v9" &lt;linker-type&gt;sun ; </p> </blockquote> <p> However it seems that serialization does not honour this. I implied because compiling of boost yields that error (Sorry a bit long). This is no big deal as long as one does not need it. Other components keep working </p> <p> gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/basic_text_woprimitive.o boost/archive/basic_text_oprimitive.hpp: In member function `void </p> <blockquote> <p> boost::archive::basic_text_oprimitive&lt;OStream&gt;::save(bool) [with OStream = std::wostream]': </p> </blockquote> <p> libs/serialization/src/basic_text_woprimitive.cpp:30: instantiated from here boost/archive/basic_text_oprimitive.hpp:92: warning: unused variable `int i' gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/binary_wiarchive.o gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/binary_woarchive.o boost/archive/basic_binary_oprimitive.hpp: In member function `void </p> <blockquote> <p> boost::archive::basic_binary_oprimitive&lt;Archive, Elem, Tr&gt;::save(bool) [with Archive = boost::archive::binary_woarchive, Elem = wchar_t, Tr = std::char_traits&lt;wchar_t&gt;]': </p> </blockquote> <p> libs/serialization/src/binary_woarchive.cpp:32: instantiated from here boost/archive/basic_binary_oprimitive.hpp:90: warning: unused variable `int i' gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/text_wiarchive.o gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/text_woarchive.o gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/utf8_codecvt_facet.o gcc.compile.c++ bin.v2/libs/serialization/build/gcc-3.3.2/release/threading-multi/xml_wgrammar.o boost/spirit/core/scanner/scanner.hpp: In static member function `static void </p> <blockquote> <p> boost::spirit::attributed_action_policy&lt;boost::spirit::nil_t&gt;::call(const ActorT&amp;, boost::spirit::nil_t, const IteratorT&amp;, const IteratorT&amp;) [with ActorT = boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, IteratorT = <span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;]': </p> </blockquote> <p> boost/spirit/core/scanner/scanner.hpp:161: instantiated from `void boost::spirit::action_policy::do_action(const ActorT&amp;, AttrT&amp;, const IteratorT&amp;, const IteratorT&amp;) const [with ActorT = boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, AttrT = boost::spirit::nil_t, IteratorT = <span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;]' boost/spirit/core/composite/actions.hpp:109: instantiated from `typename boost::spirit::parser_result&lt;boost::spirit::action&lt;ParserT, ActionT&gt;, ScannerT&gt;::type boost::spirit::action&lt;ParserT, ActionT&gt;::parse(const ScannerT&amp;) const [with ScannerT = boost::spirit::scanner&lt;<span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, ParserT = boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt;, ActionT = boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;]' boost/spirit/core/composite/sequence.hpp:54: instantiated from `typename boost::spirit::parser_result&lt;boost::spirit::sequence&lt;A, B&gt;, ScannerT&gt;::type boost::spirit::sequence&lt;A, B&gt;::parse(const ScannerT&amp;) const [with ScannerT = boost::spirit::scanner&lt;<span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, A = boost::spirit::sequence&lt;boost::spirit::sequence&lt;boost::spirit::strlit&lt;const wchar_t*&gt;, boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt; &gt;, boost::spirit::chlit&lt;wchar_t&gt; &gt;, B = boost::spirit::action&lt;boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt;, boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt; &gt;]' boost/spirit/core/composite/sequence.hpp:53: instantiated from `typename boost::spirit::parser_result&lt;boost::spirit::sequence&lt;A, B&gt;, ScannerT&gt;::type boost::spirit::sequence&lt;A, B&gt;::parse(const ScannerT&amp;) const [with ScannerT = boost::spirit::scanner&lt;<span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, A = boost::spirit::sequence&lt;boost::spirit::sequence&lt;boost::spirit::sequence&lt;boost::spirit::strlit&lt;const wchar_t*&gt;, boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt; &gt;, boost::spirit::chlit&lt;wchar_t&gt; &gt;, boost::spirit::action&lt;boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt;, boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt; &gt; &gt;, B = boost::spirit::chlit&lt;wchar_t&gt;]' boost/spirit/core/non_terminal/impl/rule.ipp:233: instantiated from `typename boost::spirit::match_result&lt;ScannerT, AttrT&gt;::type boost::spirit::impl::concrete_parser&lt;ParserT, ScannerT, AttrT&gt;::do_parse_virtual(const ScannerT&amp;) const [with ParserT = boost::spirit::sequence&lt;boost::spirit::sequence&lt;boost::spirit::sequence&lt;boost::spirit::sequence&lt;boost::spirit::strlit&lt;const wchar_t*&gt;, boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt; &gt;, boost::spirit::chlit&lt;wchar_t&gt; &gt;, boost::spirit::action&lt;boost::spirit::rule&lt;boost::spirit::scanner&lt;__gnu_cxx::__normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, boost::spirit::nil_t, boost::spirit::nil_t&gt;, boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt; &gt; &gt;, boost::spirit::chlit&lt;wchar_t&gt; &gt;, ScannerT = boost::spirit::scanner&lt;<span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;, boost::spirit::scanner_policies&lt;boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy&gt; &gt;, AttrT = boost::spirit::nil_t]' /usr/local/include/c++/3.3.2/bits/locale_facets.h:178: instantiated from here boost/spirit/core/scanner/scanner.hpp:146: error: no match for call to `(const </p> <blockquote> <p> boost::archive::xml::assign_impl&lt;std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;) (const <span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;&amp;, const <span class="underline">gnu_cxx::</span>normal_iterator&lt;wchar_t*, std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt; &gt;&amp;)' </p> </blockquote> <p> libs/serialization/src/basic_xml_grammar.ipp:48: error: candidates are: void </p> <blockquote> <p> boost::archive::xml::assign_impl&lt;T&gt;::operator()(T) const [with T = std::basic_string&lt;wchar_t, std::char_traits&lt;wchar_t&gt;, std::allocator&lt;wchar_t&gt; &gt;] </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1824 Trac 1.4.3 Robert Ramey Wed, 21 May 2008 01:57:09 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1824#comment:1 https://svn.boost.org/trac10/ticket/1824#comment:1 <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">worksforme</span> </li> </ul> <p> I don't see a problem here. </p> <p> As I understand it, BOOST_NO_STD_WSTRING means therer is no wstring. But there is no reason that there can't be a wchar_t. </p> Ticket