相关疑难解决方法(0)

GCC中的C++ 0x正则表达式

以下代码:

#include <regex>
using namespace std;

(snippage)

regex_search(s, m, re);
Run Code Online (Sandbox Code Playgroud)

适用于Microsoft C++,但GCC 4.4.3提供以下错误消息:

/usr/include/c++/4.4/tr1_impl/regex:2255:警告:内联函数'bool std :: regex_search(_Bi_iter,_Bi_iter,std :: match_results <_Bi_iter,_Allocator>&,const std :: basic_regex <_Ch_type,_Rx_traits >&,std :: regex_constants :: match_flag_type)[与_Bi_iter = __gnu_cxx :: __ normal_iterator,std :: allocator >>,_ Allocator = std :: allocator,std :: allocator >>>,_Ch_type = char,_Rx_traits = std :: regex_traits]'已使用但从未定义过

当然,如果正则表达式只是GCC待办事项列表中的C++ 0x功能之一,我也不会感到惊讶,但在这种情况下,我为什么感到高兴呢?包含指令,变量声明等,并且仅在函数调用上跳过(它甚至似乎理解).

有什么我想念的吗?

regex gcc c++11

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++11 ×1

gcc ×1

regex ×1