0
我有一个简单的代码两行“无效操作数为二进制表达......”当试图比较regex_iterators
std::regex_iterator<std::string::const_iterator>
regit (attributesStart, _curIter, _attributeRegex),
regend(std::regex_iterator<std::string::const_iterator>);
while (regit != regend)
{
// [...]
}
编译器抱怨的while
线,说
无效的操作数到二进制表达式('std :: regex_iterator'和'std :: regex_iterator(*)(std :: regex_iterator)')
任何想法,为什么这是?
MVP? 'regend(std :: regex_iterator)'没有声明一个对象,它声明了一个函数。你需要'regend(std :: regex_iterator ())'。 –
2014-11-23 22:28:21