2
我与升压xpressive中玩弄周围和我遇到了下列故障片断xpressive中>> =操作
#include <iostream>
#include <string>
#include <boost/xpressive/xpressive.hpp>
using namespace std;
using namespace boost::xpressive;
int main()
{
string s("123");
sregex rex = _d;
rex >>= _d;
smatch what;
regex_search(s, what, rex);
cout << "Match: " << what[0] << endl;
return 0;
}
运行这个程序的结果是1
匹配,而不是预期的12
。 sregex::operator>>=
有不同的含义/使用我直觉上认为的吗?我期待这会产生类似于_d >> _d
的sregex
。