Good day.
I use boost::regex with ICU. When I try call u32regex_match for symbol with code 0xDA10, I get an expression “string iterator not dereferencable (xstring, line 112)”. If I use other symbol (for example, “X”) it works correctly. If I use wregex (wighout ICU) it works correctly too. What could be the problem?
The code:
#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <boost/regex.hpp>
#include <boost/regex/icu.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
boost::u32regex delimiterRegex = boost::make_u32regex(L"\\W");
std::wstring symbol = L"X”;
symbol[0] = wchar_t(0xDA10); // <= for this symbol
if (boost::u32regex_match(symbol, delimiterRegex)) // <= assertion here
std::cout << "success" << std::endl;
else
std::cout << "not match\n";
_getch();
return 0;
}
I checked it for boost_1_47_0.
MSVC 2008 compiler.
Thank you in advance,
Slava Mitin