Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/156.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ std::regex_搜索覆盖,参数为range donds';不编译_C++_Regex_C++11_Std - Fatal编程技术网

C++ std::regex_搜索覆盖,参数为range donds';不编译

C++ std::regex_搜索覆盖,参数为range donds';不编译,c++,regex,c++11,std,C++,Regex,C++11,Std,我想使用这个覆盖,它可以关联目标字符串的偏移量(范围) template< class BidirIt, class CharT, class Traits > bool regex_search( BidirIt first, BidirIt last, const std::basic_regex<CharT,Traits>& e, std::regex_const

我想使用这个覆盖,它可以关联目标字符串的偏移量(范围)

template< class BidirIt,
          class CharT, class Traits >
bool regex_search( BidirIt first, BidirIt last,
                   const std::basic_regex<CharT,Traits>& e,
                   std::regex_constants::match_flag_type flags = 
                       std::regex_constants::match_default );
template
bool regex_搜索(BidirIt first,BidirIt last,
常数标准::基本规则与e,
std::regex_常量::匹配_标志_类型标志=
std::regex_常量::match_默认值);
下面是我没有编译的代码。去掉m参数可以使它工作,但我可以这样检索匹配信息

string s = "a**b cd e*f.";
size_t asteriskPos = s.find('*');
std::smatch m;
bool b = std::regex_search(s.begin()+asteriskPos , s.end(), m, std::regex("[^a-z*]"));
cout << b << endl;
string s=“a**b cd e*f.”;
size_t asteriskPos=s.find('*');
std::smatch m;
bool b=std::regex_搜索(s.begin()+asteriskPos,s.end(),m,std::regex(“[^a-z*]”);
我能找到这个吗

常量迭代器可以工作

auto iter = test.cbegin();
auto end = test.cend();