sub_match.qbk

来自「Boost provides free peer-reviewed portab」· QBK 代码 · 共 851 行 · 第 1/3 页

QBK
851
字号
                  const sub_match<BidirectionalIterator>& m2);   //   // stream inserter:   //   template <class charT, class traits, class BidirectionalIterator>   basic_ostream<charT, traits>&      ``[link boost_regex.sub_match.op_stream operator << ]``(basic_ostream<charT, traits>& os,                  const sub_match<BidirectionalIterator>& m);   } // namespace boost[h4 Description][h5 Members][#boost_regex.sub_match.value_type]   typedef typename std::iterator_traits<iterator>::value_type value_type;The type pointed to by the iterators.[#boost_regex.sub_match.diff_type]   typedef typename std::iterator_traits<iterator>::difference_type difference_type;A type that represents the difference between two iterators.[#boost_regex.sub_match.it_type]   typedef BidirectionalIterator iterator;The iterator type.[#boost_regex.sub_match.first]   iterator firstAn iterator denoting the position of the start of the match.[#boost_regex.sub_match.second]   iterator secondAn iterator denoting the position of the end of the match.[#boost_regex.sub_match.matched]   bool matchedA Boolean value denoting whether this sub-expression participated in the match.[#boost_regex.sub_match.length]   static difference_type length();[*Effects]: returns the length of this matched sub-expression, or 0 if this sub-expression was not matched: `matched ? distance(first, second) : 0)`.[#boost_regex.sub_match.cast]   operator basic_string<value_type>()const;[*Effects]: converts `*this` into a string: returns `(matched ? basic_string<value_type>(first, second) : basic_string<value_type>())`.[#boost_regex.sub_match.str]   basic_string<value_type> str()const;[*Effects]: returns a string representation of `*this`:  `(matched ? basic_string<value_type>(first, second) : basic_string<value_type>())`.[#boost_regex.sub_match.compare1]   int compare(const sub_match& s)const;[*Effects]: performs a lexical comparison to /s/: returns `str().compare(s.str())`.[#boost_regex.sub_match.compare2]   int compare(const basic_string<value_type>& s)const;[*Effects]: compares `*this` to the string /s/: returns `str().compare(s)`.[#boost_regex.sub_match.compare3]   int compare(const value_type* s)const;[*Effects]: compares `*this` to the null-terminated string /s/: returns `str().compare(s)`.[#boost_regex.sub_match.cap_seq_type]   typedef implementation-private capture_sequence_type;Defines an implementation-specific type that satisfies the requirements of a standard library Sequence (21.1.1 including the optional Table 68 operations), whose value_type is a `sub_match<BidirectionalIterator>`. This type happens to be `std::vector<sub_match<BidirectionalIterator> >`, but you shouldn't actually rely on that.[#boost_regex.sub_match.captures]   const capture_sequence_type& captures()const; [*Effects]: returns a sequence containing all the captures obtained for this sub-expression.[*Preconditions]: the library must be built and used with BOOST_REGEX_MATCH_EXTRA defined, and you must pass the flag `match_extra` to the regex matching functions ([regex_match], [regex_search], [regex_iterator] or [regex_token_iterator]) in order for this member #function to be defined and return useful information.[*Rationale]: Enabling this feature has several consequences:* sub_match occupies more memory resulting in complex expressions running out of memory or stack space more quickly during matching.* The matching algorithms are less efficient at handling some features (independent sub-expressions for example), even when match_extra is not used.* The matching algorithms are much less efficient (i.e. slower), when match_extra is used.  Mostly this is down to the extra memory allocations that have to take place.[h5 sub_match non-member operators][#boost_regex.sub_match.op_compare1]   template <class BidirectionalIterator>   bool operator == (const sub_match<BidirectionalIterator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs.compare(rhs) == 0`.[#boost_regex.sub_match.op_compare2]   template <class BidirectionalIterator>   bool operator != (const sub_match<BidirectionalIterator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs.compare(rhs) != 0`.[#boost_regex.sub_match.op_compare3]   template <class BidirectionalIterator>   bool operator < (const sub_match<BidirectionalIterator>& lhs,                  const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs.compare(rhs) < 0`.[#boost_regex.sub_match.op_compare4]   template <class BidirectionalIterator>   bool operator <= (const sub_match<BidirectionalIterator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs.compare(rhs) <= 0`.[#boost_regex.sub_match.op_compare5]   template <class BidirectionalIterator>   bool operator >= (const sub_match<BidirectionalIterator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs.compare(rhs) >= 0`.[#boost_regex.sub_match.op_compare6]   template <class BidirectionalIterator>   bool operator > (const sub_match<BidirectionalIterator>& lhs,                  const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs.compare(rhs) > 0`.[#boost_regex.sub_match.op_compare7]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                                              traits,                                                             Allocator>& lhs,                      const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs == rhs.str()`.[#boost_regex.sub_match.op_compare8]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                                              traits,                                                              Allocator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs != rhs.str()`.[#boost_regex.sub_match.op_compare9]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                             traits,                                             Allocator>& lhs,                    const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs < rhs.str()`.[#boost_regex.sub_match.op_compare10]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                                             traits,                                                             Allocator>& lhs,                    const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs > rhs.str()`.[#boost_regex.sub_match.op_compare11]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                              traits,                                              Allocator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs >= rhs.str()`.[#boost_regex.sub_match.op_compare12]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                              traits,                                              Allocator>& lhs,                     const sub_match<BidirectionalIterator>& rhs);[*Effects]: returns `lhs <= rhs.str()`.[#boost_regex.sub_match.op_compare13]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator == (const sub_match<BidirectionalIterator>& lhs,                     const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                              traits,                                              Allocator>& rhs);[*Effects]: returns `lhs.str() == rhs`.[#boost_regex.sub_match.op_compare14]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator != (const sub_match<BidirectionalIterator>& lhs,                     const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                              traits,                                              Allocator>& rhs);[*Effects]: returns `lhs.str() != rhs`.[#boost_regex.sub_match.op_compare15]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator < (const sub_match<BidirectionalIterator>& lhs,                  const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                           traits,                                           Allocator>& rhs);[*Effects]: returns `lhs.str() < rhs`.[#boost_regex.sub_match.op_compare16]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator > (const sub_match<BidirectionalIterator>& lhs,                    const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                             traits,                                             Allocator>& rhs);[*Effects]: returns `lhs.str() > rhs`.[#boost_regex.sub_match.op_compare17]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator >= (const sub_match<BidirectionalIterator>& lhs,                     const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,                                              traits,                                              Allocator>& rhs);[*Effects]: returns `lhs.str() >= rhs`.[#boost_regex.sub_match.op_compare18]   template <class BidirectionalIterator, class traits, class Allocator>    bool operator <= (const sub_match<BidirectionalIterator>& lhs,

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?