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

operators (std::sub_match)

运算符=,%21=,<,<=,>,>=%28std::sub[医]匹配%29

Defined in header
Direct comparison
template< class BidirIt > bool operator==( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs (1)(since C++11)
template< class BidirIt > bool operator!=( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs (2)(since C++11)
template< class BidirIt > bool operator<( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs (3)(since C++11)
template< class BidirIt > bool operator<=( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs (4)(since C++11)
template< class BidirIt > bool operator>( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs (5)(since C++11)
template< class BidirIt > bool operator>=( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs (6)(since C++11)
std::basic_string and std::sub_match
template< class BidirIt, class Traits, class Alloc > bool operator==( const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& lhs, const sub_match<BidirIt>& rhs (7)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator!=( const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& lhs, const sub_match<BidirIt>& rhs (8)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator<( const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& lhs, const sub_match<BidirIt>& rhs (9)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator<=( const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& lhs, const sub_match<BidirIt>& rhs (10)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator>( const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& lhs, const sub_match<BidirIt>& rhs (11)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator>=( const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& lhs, const sub_match<BidirIt>& rhs (12)(since C++11)
std::sub_match and std::basic_string
template< class BidirIt, class Traits, class Alloc > bool operator==( const sub_match<BidirIt>& lhs, const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& rhs (13)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator!=( const sub_match<BidirIt>& lhs, const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& rhs (14)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator<( const sub_match<BidirIt>& lhs, const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& rhs (15)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator<=( const sub_match<BidirIt>& lhs, const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& rhs (16)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator>( const sub_match<BidirIt>& lhs, const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& rhs (17)(since C++11)
template< class BidirIt, class Traits, class Alloc > bool operator>=( const sub_match<BidirIt>& lhs, const std::basic_string< typename std::iterator_traits<BidirIt>::value_type, Traits,Alloc>& rhs (18)(since C++11)
std::iterator_traits<BidirIt>::value_type* and std::sub_match
template< class BidirIt > bool operator==( const typename std::iterator_traits<BidirIt>::value_type* rhs, const sub_match<BidirIt>& rhs (19)(since C++11)
template< class BidirIt > bool operator!=( const typename std::iterator_traits<BidirIt>::value_type* rhs, const sub_match<BidirIt>& rhs (20)(since C++11)
template< class BidirIt > bool operator<( const typename std::iterator_traits<BidirIt>::value_type* rhs, const sub_match<BidirIt>& rhs (21)(since C++11)
template< class BidirIt > bool operator<=( const typename std::iterator_traits<BidirIt>::value_type* rhs, const sub_match<BidirIt>& rhs (22)(since C++11)
template< class BidirIt > bool operator>( const typename std::iterator_traits<BidirIt>::value_type* rhs, const sub_match<BidirIt>& rhs (23)(since C++11)
template< class BidirIt > bool operator>=( const typename std::iterator_traits<BidirIt>::value_type* rhs, const sub_match<BidirIt>& rhs (24)(since C++11)
std::sub_match and std::iterator_traits<BidirIt>::value_type*
template< class BidirIt > bool operator==( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type* rhs (25)(since C++11)
template< class BidirIt > bool operator!=( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type* rhs (26)(since C++11)
template< class BidirIt > bool operator<( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type* rhs (27)(since C++11)
template< class BidirIt > bool operator<=( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type* rhs (28)(since C++11)
template< class BidirIt > bool operator>( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type* rhs (29)(since C++11)
template< class BidirIt > bool operator>=( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type* rhs (30)(since C++11)
std::iterator_traits<BidirIt>::value_type& and std::sub_match
template< class BidirIt > bool operator==( const typename std::iterator_traits<BidirIt>::value_type& rhs, const sub_match<BidirIt>& rhs (31)(since C++11)
template< class BidirIt > bool operator!=( const typename std::iterator_traits<BidirIt>::value_type& rhs, const sub_match<BidirIt>& rhs (32)(since C++11)
template< class BidirIt > bool operator<( const typename std::iterator_traits<BidirIt>::value_type& rhs, const sub_match<BidirIt>& rhs (33)(since C++11)
template< class BidirIt > bool operator<=( const typename std::iterator_traits<BidirIt>::value_type& rhs, const sub_match<BidirIt>& rhs (34)(since C++11)
template< class BidirIt > bool operator>( const typename std::iterator_traits<BidirIt>::value_type& rhs, const sub_match<BidirIt>& rhs (35)(since C++11)
template< class BidirIt > bool operator>=( const typename std::iterator_traits<BidirIt>::value_type& rhs, const sub_match<BidirIt>& rhs (36)(since C++11)
std::sub_match and std::iterator_traits<BidirIt>::value_type&
template< class BidirIt > bool operator==( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type& rhs (37)(since C++11)
template< class BidirIt > bool operator!=( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type& rhs (38)(since C++11)
template< class BidirIt > bool operator<( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type& rhs (39)(since C++11)
template< class BidirIt > bool operator<=( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type& rhs (40)(since C++11)
template< class BidirIt > bool operator>( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type& rhs (41)(since C++11)
template< class BidirIt > bool operator>=( const sub_match<BidirIt>& lhs, const typename std::iterator_traits<BidirIt>::value_type& rhs (42)(since C++11)

比较sub_match另一个sub_match、字符串、以空结尾的字符序列或字符。

1-6%29比较两sub_match直接通过比较它们的潜在字符序列。好像是由lhs.compare(rhs)

7-18%29比较asub_match带着std::basic_string.执行似由sm.compare(typename sub_match<BidirIt>::string_type(st.data(), st.size()),在哪里sm是sub_match争论和st是basic_string争论。

19-30%29比较asub_match以空结尾的字符串。好像是由sm.compare(s),在哪里smsub_matchs指向以空结尾的字符串的指针。

31-42%29比较asub_match和一个角色。好像是由sm.compare(typename sub_match<BidirIt>::string_type(1, ch)),在哪里sm是sub_match和ch是个角色。

参数

lhs, rhs-a sub_match, basic_string, pointer to a null-terminated string or a character to compare

返回值

true如果相应的比较符合std::sub_match::compare(),,,false否则。

另见

comparecompares matched subsequence (if any) (public member function)

© cppreference.com

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

http://en.cppreference.com/w/cpp/regex/sub[医]匹配/运算符[医]CMP