Boost logo

Boost :

From: Alain Cormier (acormier_at_[hidden])
Date: 2006-06-22 15:24:06


I'm working with the Regex library and I get the following compiler error:

[C++ Fatal Error] regex_replace.hpp(95): F1004 Internal compiler error
at 0x99a2402 with base 0x9930000

When I uncomment the line (last function in mydll.cpp):
//std::wstring txt = L"";

I find this very strange since this line of code doesn't seem to have
anything to do with the error I'm getting.

I found discussions about similar errors in the archive but nothing
that helped me solve my problem.

Does anyone know how to solve this?

I'm working with Borland C++ Builder 2006.

Thanks,
Alain

//-----------------------------------------------------
//mydll.cpp
// ...
#define BOOST_ALL_NO_LIB
#include "boost/regex.hpp"

#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
lpReserved)
{
        return 1;
}

std::wstring ibs_wregex_replace(std::wstring s, std::wstring rx,
std::wstring replace) {
        boost::wregex reg(rx);
        return boost::regex_replace(s, reg, replace);
}

std::string ibs_regex_replace(std::string s, std::string rx,
std::string replace) {
        boost::regex reg(rx);
        return boost::regex_replace(s, reg, replace);
}

std::wstring f(std::wstring& xml_str, std::wstring e) {
        // **** COMPILER ERROR WHEN I UNCOMMENT THE NEXT LINE ****
        //std::wstring txt = L"";
        return L"";
}
// ...

//----------------------------------------------------
//regex_replace.hpp
// ...
template <class traits, class charT>
std::basic_string<charT> regex_replace(const std::basic_string<charT>& s,
                         const basic_regex<charT, traits>& e,
                         const std::basic_string<charT>& fmt,
                         match_flag_type flags = match_default)
{
   std::basic_string<charT> result;
// **** THE NEXT LINE NUMBER IS 95 ****
   re_detail::string_out_iterator<std::basic_string<charT> >
i(result); // **** line 95 ****
   regex_replace(i, s.begin(), s.end(), e, fmt.c_str(), flags);
   return result;
}
// ...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk