31 Regular expressions library [re]

31.10 Class template match_­results [re.results]

31.10.3 match_­results size [re.results.size]

size_type size() const;

Returns: One plus the number of marked sub-expressions in the regular expression that was matched if *this represents the result of a successful match. Otherwise returns 0. [Note: The state of a match_­results object can be modified only by passing that object to regex_­match or regex_­search. Sections [re.alg.match] and [re.alg.search] specify the effects of those algorithms on their match_­results arguments. end note]

size_type max_size() const;

Returns: The maximum number of sub_­match elements that can be stored in *this.

bool empty() const;

Returns: size() == 0.