Created on 2009-07-25.00:00:00 last changed 162 months ago
Proposed resolution:
In the class template sub_match synopsis [re.submatch]/1 change as indicated:
template <class BidirectionalIterator> class sub_match : public std::pair<BidirectionalIterator, BidirectionalIterator> { public: typedef typename iterator_traits<BidirectionalIterator>::value_type value_type; typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type; typedef BidirectionalIterator iterator; typedef basic_string<value_type> string_type; bool matched; difference_type length() const; operatorbasic_string<value_type>string_type() const;basic_string<value_type>string_type str() const; int compare(const sub_match& s) const; int compare(constbasic_string<value_type>string_type& s) const; int compare(const value_type* s) const; };
In [re.submatch.members]/2 change as indicated:
operatorbasic_string<value_type>string_type() const;Returns: matched ?
basic_string<value_type>string_type(first, second) :basic_string<value_type>string_type().
In [re.submatch.members]/3 change as indicated:
basic_string<value_type>string_type str() const;Returns: matched ?
basic_string<value_type>string_type(first, second) :basic_string<value_type>string_type().
In [re.submatch.members]/5 change as indicated:
int compare(constbasic_string<value_type>string_type& s) const;
[ 2009-11-15 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
The definition of class template sub_match is strongly dependent on the type basic_string<value_type>, both in interface and effects, but does not provide a corresponding typedef string_type, as e.g. class match_results does, which looks like an oversight to me that should be fixed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg1040 |
2010-10-21 18:28:33 | admin | set | messages: + msg1039 |
2009-07-25 00:00:00 | admin | create |