嗯,我想知道为什么这不起作用 - 如果这是VS 2010的一个简单问题;
std::basic_regex<char32_t> re;
上面一行给出了编译错误:
1>c:\program files\microsoft visual studio 10.0\vc\include\regex(1975): error C2027: use of undefined type 'std::tr1::regex_traits<_Elem>'
1> with
1> [
1> _Elem=char32_t
1> ]
还有很多跟进错误,都在同一行。这是一个特定于visual studio 2010的问题 - 是否有解决方法(除了首先将字符串转换为UTF8并将其作为基础然后重新转换回UTF32)。
和/或我应该使用boost::regex
然后我会绕过这个问题吗?
答案 0 :(得分:0)