在线文档教程
C++
规律表达 | Regular expressions

std::regex_iterator::operators

STD::regex[医]迭代器::运算符==,运算符%21=

bool operator==(const regex_iterator& rhs) const;(1)(since C++11)
bool operator!=(const regex_iterator& rhs) const;(2)(since C++11)

比较两regex_iteratorS.

为了说明,假设regex_iterator包含下列成员:

  • BidirIt begin

  • BidirIt end

  • const regex_type *pregex;

  • std::regex_constants::match_flag_typeflags;

  • std::match_results<BidirIt> match;

1%29true如果*thisrhs都是序列结束迭代器,或者如果下列所有条件都为真:

  • begin == rhs.begin

  • end == rhs.end

  • pregex == rhs.pregex

  • flags == rhs.flags

  • match[0] == rhs.match[0]

2%29!(*this == rhs)

参数

rhs-a regex_iterator to compare to

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/regex/regex[医]迭代器/算子[医]CMP