Opened 15 years ago
Closed 14 years ago
#1824 closed Bugs (worksforme)
serialization keeps using wchar_t if BOOST_NO_STD_WSTRING is set
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | Boost 1.36.0 | Component: | serialization |
Version: | Boost 1.35.0 | Severity: | Problem |
Keywords: | wchar_t serialization BOOST_NO_STD_WSTRING | Cc: |
Description
I was for some reason compiling boost with an individual user.hpp that defines
#define BOOST_NO_STD_WSTRING
#define BOOST_DATE_TIME_NO_LOCALE
My config is Sparc Solaris target 32bit Gcc 3.3.2 gcc-Stl --without-icu
# Compiler configuration
using gcc : : : <cflags>"-mcpu=v9"
<cxxflags>"-mcpu=v9 -DBOOST_USER_CONFIG=
\"boost/config/user_ohne_wchar_t.hpp
\""
<linkflags>"-mcpu=v9" <linker-type>sun ;
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
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
boost::archive::basic_text_oprimitive<OStream>::save(bool) [with OStream = std::wostream]':
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
boost::archive::basic_binary_oprimitive<Archive, Elem, Tr>::save(bool) [with Archive = boost::archive::binary_woarchive, Elem = wchar_t, Tr = std::char_traits<wchar_t>]':
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
boost::spirit::attributed_action_policy<boost::spirit::nil_t>::call(const ActorT&, boost::spirit::nil_t, const IteratorT&, const IteratorT&) [with ActorT = boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, IteratorT = gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >]':
boost/spirit/core/scanner/scanner.hpp:161: instantiated from `void boost::spirit::action_policy::do_action(const ActorT&, AttrT&, const IteratorT&, const IteratorT&) const [with ActorT = boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, AttrT = boost::spirit::nil_t, IteratorT = gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >]' boost/spirit/core/composite/actions.hpp:109: instantiated from `typename boost::spirit::parser_result<boost::spirit::action<ParserT, ActionT>, ScannerT>::type boost::spirit::action<ParserT, ActionT>::parse(const ScannerT&) const [with ScannerT = boost::spirit::scanner<gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, ParserT = boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t>, ActionT = boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >]' boost/spirit/core/composite/sequence.hpp:54: instantiated from `typename boost::spirit::parser_result<boost::spirit::sequence<A, B>, ScannerT>::type boost::spirit::sequence<A, B>::parse(const ScannerT&) const [with ScannerT = boost::spirit::scanner<gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, A = boost::spirit::sequence<boost::spirit::sequence<boost::spirit::strlit<const wchar_t*>, boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t> >, boost::spirit::chlit<wchar_t> >, B = boost::spirit::action<boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t>, boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >]' boost/spirit/core/composite/sequence.hpp:53: instantiated from `typename boost::spirit::parser_result<boost::spirit::sequence<A, B>, ScannerT>::type boost::spirit::sequence<A, B>::parse(const ScannerT&) const [with ScannerT = boost::spirit::scanner<gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, A = boost::spirit::sequence<boost::spirit::sequence<boost::spirit::sequence<boost::spirit::strlit<const wchar_t*>, boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t> >, boost::spirit::chlit<wchar_t> >, boost::spirit::action<boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t>, boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > >, B = boost::spirit::chlit<wchar_t>]' boost/spirit/core/non_terminal/impl/rule.ipp:233: instantiated from `typename boost::spirit::match_result<ScannerT, AttrT>::type boost::spirit::impl::concrete_parser<ParserT, ScannerT, AttrT>::do_parse_virtual(const ScannerT&) const [with ParserT = boost::spirit::sequence<boost::spirit::sequence<boost::spirit::sequence<boost::spirit::sequence<boost::spirit::strlit<const wchar_t*>, boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t> >, boost::spirit::chlit<wchar_t> >, boost::spirit::action<boost::spirit::rule<boost::spirit::scanner<__gnu_cxx::__normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, boost::spirit::nil_t, boost::spirit::nil_t>, boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > >, boost::spirit::chlit<wchar_t> >, ScannerT = boost::spirit::scanner<gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> >, 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
boost::archive::xml::assign_impl<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >) (const gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >&, const gnu_cxx::normal_iterator<wchar_t*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >&)'
libs/serialization/src/basic_xml_grammar.ipp:48: error: candidates are: void
boost::archive::xml::assign_impl<T>::operator()(T) const [with T = std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >]
I don't see a problem here.
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.