![](/img/trans.png)
[英]Visual Studio C++ 2015 std::codecvt with char16_t or char32_t
[英]std::regex with char32_t in microsoft visual studio?
好吧,我想知道为什么这不起作用-并且这是否是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
来解决这个问题吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.