i have problems with the file c_regex_traits.cpp. I work under CodeWarrior 6/7 with a Macintosh. These problem ist with boost 1.25.1,1.26.
template <class charT> unsigned int BOOST_REGEX_CALL re_get_message(charT* buf, unsigned int len, unsigned int id) { unsigned int size = _re_get_message((char*)0, 0, id); if(len < size) return size; boost::scoped_array<char> cb(new char[size]); _re_get_message(cb.get(), size, id); size = boost::c_regex_traits
::strwiden(buf, len, cb.get()); return size; } inline unsigned int BOOST_REGEX_CALL re_get_message(char* buf, unsigned int len, unsigned int id) { return _re_get_message(buf, len, id); }
Is that a known problem? Do you know a workaround? (Renaming one of the 're_get_message()' functions does the job, but I'm not sure about the implications.)
I've had a chance to experiment a little with this - if BOOST_NO_WREGEX is defined (i.e. wide character support is disabled), then removing the template version of re_get_message is harmless (and may therefore be the fix that you are looking for). If BOOST_NO_WREGEX is not defined, then obviously this won't work - so that being the case, what happens if you surround the definition of
template <class charT> unsigned int BOOST_REGEX_CALL re_get_message(charT* buf, unsigned int len, unsigned int id)
with
#ifndef BOOST_NO_WREGEX ... #endif
regards,
John Maddock
Sorry, but I haven't had a chance to answer. Ok it's works. But I need 'wide character support' much later. best regards, Rene Gutschmidt