$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: msternerkthse
Date: 2003-02-15 15:49:58
The following code on line 841 of c_regex_traits.cpp in the regex
library caused a crash when I used it in CodeWarrior 8.1 under OSX:
std::string l(std::setlocale(LC_CTYPE, 0));
Afaict the crash was caused by setlocale() returning 0. To fix this I
had to resort to the following ugly hack:
namespace std
{
const char* mysetlocale(int, const char*) { return "C"; }
};
#include "boost/regex.hpp"
#define setlocale mysetlocale
#include "boost/regex/src.cpp"
The C locale was used because I had BOOST_REGEX_USE_C_LOCALE defined.
I didn't want to use the C++ locale since it doesn't even provide the
basic 0x00-0xFF unicode case mapping that's built into the C locale
(due to limited locale support in CW I guess). I'm using the wregex
class.
Mikael Sterner