繁体   English   中英

C ++ std :: regex在不同编译器中的实现

[英]C++ std::regex implementation in different compilers

考虑以下代码。

std::regex re ("(qwe|asd|zxc)+");
std::cout << std::regex_match ("zxcqweasd", re) << std::endl;

使用cl编译器时,如果使用g++编译器,则打印10

哪个std::regex实现错误?

我正在使用g++编译器版本4.7.2-5和cl编译器版本17.00.60610.1。

gcc 4.7尚未完成对c ++ 11的标准库支持。 正则表达式是缺少的主要部分。

cl编译器是正确的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM