31 Regular expressions library [re]

31.9 Class template sub_­match [re.submatch]

31.9.1 sub_­match members [re.submatch.members]

constexpr sub_match();
Effects: Value-initializes the pair base class subobject and the member matched.
difference_type length() const;
Returns: matched ? distance(first, second) : 0.
operator string_type() const;
Returns: matched ? string_­type(first, second) : string_­type().
string_type str() const;
Returns: matched ? string_­type(first, second) : string_­type().
int compare(const sub_match& s) const;
Returns: str().compare(s.str()).
int compare(const string_type& s) const;
Returns: str().compare(s).
int compare(const value_type* s) const;
Returns: str().compare(s).