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
Sorry, but I haven't had a chance to answer.
Ok it's works. But I need 'wide character support' much later.
Then you are going to have to figure out why BOOST_NO_WREGEX is getting set and fix the problem - it may not be possible if your platform is lacking something that regex wants here, when your ready to look into it let me know (hint start by running libs/config/test/config_info.cpp and see which BOOST config options are set). John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
Sorry, but I haven't had a chance to answer.
Ok it's works. But I need 'wide character support' much later.
Then you are going to have to figure out why BOOST_NO_WREGEX is getting set and fix the problem - it may not be possible if your platform is lacking something that regex wants here, when your ready to look into it let me know (hint start by running libs/config/test/config_info.cpp and see which BOOST config options are set).
John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
OK, BOOST_NO_WREGEX isn't set and around the template function re_get_message is the #ifndef. #ifndef BOOST_NO_WREGEX template <class charT> unsigned int BOOST_REGEX_CALL re_get_message(charT* buf, unsigned int len, unsigned int id) { ... } #endif But the problem is the same -> Error: ambiguous access to overloaded function re_get_message(char *, unsigned int, unsigned int)' re_get_message<...>(T0 *, unsigned int, unsigned int)' And the Result of config_info.cpp is: Metrowerks CodeWarrior C++ version 0x2407 __cplusplus =199711L __STDC__ =1 __STDC_VERSION__ =199409L __MWERKS__ =0x2407 __MSL__ =0x7102 __MSL_CPP__ =0x7102 __embedded_cplusplus =0 __fourbyteints__ =1 __IEEEdoubles__ =1 __profile__ =0 __powerc =1 __POWERPC__ =1 macintosh =1 powerc =1 __STDC_HOSTED__ =0 ********************************************************************* Metrowerks Standard Library version 0x7102 ********************************************************************* Detected Platform: Mac OS Type char is signed Type wchar_t is unsigned byte order for type short =8 0 byte order for type int =24 16 8 0 byte order for type long =24 16 8 0 sizeof(wchar_t) =2 sizeof(short) =2 sizeof(int) =4 sizeof(long) =4 sizeof(float) =4 sizeof(double) =8 sizeof(long double) =8 CHAR_BIT =8 CHAR_MAX =0x7f WCHAR_MAX =0xffffU SHRT_MAX =0x7fff INT_MAX =0x7fffffff LONG_MAX =0x7fffffffL LLONG_MAX =0x7fffffffffffffffLL __STDC_IEC_559__ =1 ********************************************************************* Boost version 102600 BOOST_DECL [no value] BOOST_HAS_HASH [no value] BOOST_HAS_LONG_LONG [no value] BOOST_HAS_STDINT_H [no value] BOOST_HAS_SLIST [no value] BOOST_HAS_UNISTD_H [no value] BOOST_MSVC6_MEMBER_TEMPLATES [no value] BOOST_NESTED_TEMPLATE =template BOOST_NO_MEMBER_TEMPLATE_FRIENDS [no value] BOOST_STD_EXTENSION_NAMESPACE =Metrowerks regards, Rene Gutschmidt
OK, BOOST_NO_WREGEX isn't set and around the template function re_get_message is the #ifndef.
#ifndef BOOST_NO_WREGEX
template <class charT> unsigned int BOOST_REGEX_CALL re_get_message(charT* buf, unsigned int len, unsigned int id) { ... }
#endif
But the problem is the same -> Error: ambiguous access to overloaded function re_get_message(char *, unsigned int, unsigned int)' re_get_message<...>(T0 *, unsigned int, unsigned int)'
I think that you're going to need a Metrowerks expert to solve this one as it's a compiler problem :-( Did you try changing that to: #ifndef BOOST_NO_WREGEX unsigned int BOOST_REGEX_CALL re_get_message(wchar_t* buf, unsigned int len, unsigned int id) { ... } #endif or is this just more going round in circles? (this is what the latest cvs code has BTW). John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
OK, BOOST_NO_WREGEX isn't set and around the template function re_get_message is the #ifndef.
#ifndef BOOST_NO_WREGEX
template <class charT> unsigned int BOOST_REGEX_CALL re_get_message(charT* buf, unsigned int len, unsigned int id) { ... }
#endif
But the problem is the same -> Error: ambiguous access to overloaded function re_get_message(char *, unsigned int, unsigned int)' re_get_message<...>(T0 *, unsigned int, unsigned int)'
I think that you're going to need a Metrowerks expert to solve this one as it's a compiler problem :-(
Did you try changing that to:
#ifndef BOOST_NO_WREGEX
unsigned int BOOST_REGEX_CALL re_get_message(wchar_t* buf, unsigned int len, unsigned int id) { ... }
#endif
We'll try that.
or is this just more going round in circles? (this is what the latest cvs code has BTW).
John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
Thanks for your time! Rene Gutschmidt
participants (2)
-
John Maddock
-
René Gutschmidt