Re:[boost] Serialization compile errors on CW9

Miro Jurisic wrote:
I am trying to play with Serialization #18 on CodeWarrior 9, and I ran into the following problems:
mbstate_t is not in the global namespace when using CW9 and MW STL (I didn't test with gcc STL). This caused compile errors in archive/codecvt_null.hpp. I altered the workaround already present for Borland, but I believe this is the wrong answer, because it puts a using declaration in a header file.
We're open to suggestions.
That leaves me with the following two errors in compiling text_oarchive.cpp... I am not sure what to do about these two errors, but I am too tired to stare at them right now, so I am posting them here in hope that someone can make sense out of them... the second error in particular makes no sense to me at all.
meeroh My formatting:
Error : illegal explicit conversion from
'boost::iterator_facade< boost::archive::iterators::insert_linebreaks< boost::archive::iterators::base64_from_binary< boost::archive::iterators::transform_width< const char *, 6, 8, char >, Char >, 72, Char
, char, boost::single_pass_traversal_tag, char, char '
to 'const char *' ...
I recently cleaned up and streamlined the implementation of the "dataflow iterators" in my local copy. I don't know if this will make the above disappear. I sort of doubt it. I'm suspicious of the transition from char to const char. I'll look at this.
Error : object 'boost::archive::text_oarchive_impl<boost::archive::text_oarchive> ::text_oarchive_impl `base constructor'(std::basic_ostream<char, std::char_traits<char>> &, unsigned int)' redefined
This looks like a compiler issue in getting bool/int confused. Try Changing basic_text_oprimitive<std::ostream>( os, 0 != (flags & no_codecvt) ) At around line 63 in file text_oarchive.hpp to basic_text_oprimitive<std::ostream>( os, static_cast<bool>(0 != (flags & no_codecvt)) ) Robert Ramey

In article <20040418160047.656883147E@acme.west.net>, "Robert Ramey" <ramey@rrsd.com> wrote:
Miro Jurisic wrote:
I am trying to play with Serialization #18 on CodeWarrior 9, and I ran into the following problems:
mbstate_t is not in the global namespace when using CW9 and MW STL (I didn't test with gcc STL). This caused compile errors in archive/codecvt_null.hpp. I altered the workaround already present for Borland, but I believe this is the wrong answer, because it puts a using declaration in a header file.
We're open to suggestions.
namespace detail { #if BOOST_WORKAROUND... typedef ::mbstate_t mbstate_t; #else typedef std::mbstate_t mbstate_t; #endif } and then use detail::mbstate_t inside the affected boost header files. This will make the boost files compatible with each other, and users of those headers will be able to use whichever one of ::mbstate_t or std::mbstate_t their compiler provides.
Error : object 'boost::archive::text_oarchive_impl<boost::archive::text_oarchive> ::text_oarchive_impl `base constructor'(std::basic_ostream<char, std::char_traits<char>> &, unsigned int)' redefined
This looks like a compiler issue in getting bool/int confused. Try Changing
basic_text_oprimitive<std::ostream>( os, 0 != (flags & no_codecvt) ) At around line 63 in file text_oarchive.hpp to
basic_text_oprimitive<std::ostream>( os, static_cast<bool>(0 != (flags & no_codecvt)) )
That wasn't it. (And I am not sure what it is, as the error looks entirely bogus) meeroh -- If this message helped you, consider buying an item from my wish list: <http://web.meeroh.org/wishlist>

namespace detail { #if BOOST_WORKAROUND... typedef ::mbstate_t mbstate_t; #else typedef std::mbstate_t mbstate_t; #endif }
and then use detail::mbstate_t inside the affected boost header files. This will make the boost files compatible with each other, and users of those headers will be able to use whichever one of ::mbstate_t or std::mbstate_t their compiler provides.
I had this problem with BCB too. The solution may be likely used here. Regex (boost/regex/config.hpp) has code to deal with it. /Pavel
participants (3)
-
Miro Jurisic
-
Pavel Vozenilek
-
Robert Ramey