std::regex with char32_t in microsoft visual studio?
std::regex with char32_t in microsoft visual studio?
我想知道为什么这不是工作-如果这是一个简单的问题从VS 2010;
std::basic_regex<char32_t> re;
上面这行给出了一个编译错误:
1>c:program filesmicrosoft visual studio 10.0vcincluderegex(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
,我将绕过这个问题吗?
您很可能需要使用Boost。带ICU的正则表达式
例子:icu_example.cpp
或者,如果你在Windows上,MFC: mfc_example.cpp
相关文章:
- Microsoft Visual Studio 2019交叉编译CMake库 - 有效,但存在SEG错误
- Microsoft Visual中的此链接器错误有什么问题
- graphics.h for microsoft visual studio community 2017
- Python 包 cx_Oracle==5.1.3 Microsoft Visual C++ 9.0 是必需的
- 对于我在 Microsoft Visual C++ IDE (2005 或更高版本)的本机 win32 项目中编写的应用
- vcruntime140_app.dll未包含在Microsoft Visual C 2017重新分布(X64)中
- Microsoft Visual Studio导入库的格式
- Microsoft Visual Studio 2008,版本9.0.30739.1 SP,DLL构建错误
- 安装 Visual Studio 2015 时出现的错误,关于"Microsoft Visual C++ 2015 Redistributable"
- 如何在Microsoft Visual Studio之外构建C 代码
- 如何修复MSVC++(Microsoft Visual studio)中"macro overloading"的可变参数宏相关问题?
- 如何在Microsoft Visual Studio C 中创建游戏窗口
- Microsoft Visual Studio Intellisense未选择选定的变量
- 如何在C 中设置JSON库?(Microsoft Visual Studio)
- Microsoft Visual C++ 2015 运行时无法完成安装
- Microsoft Visual Studio发现我所有的CUDA设备端函数都有错误
- 我是否需要Microsoft Visual Studio/Eclipse才能使用opencv等库进行C++编码?
- Microsoft Visual C++, Visual Studio, 如何修复错误: 标识符"GetAsyncKeyState"未定义
- 如何使用Microsoft Visual Studio 2017配置外部编译器,如gcc +14
- 在Microsoft Visual Studio 2017中设置wxWidgets