Title
Class template match_results does not specify the semantics of operator==
Status
resolved
Section
[re.results.nonmember]
Submitter
Daniel Krügler

Created on 2010-10-24.00:00:00 last changed 171 months ago

Messages

Date: 2011-02-20.22:39:32

Proposed resolution:

Addressed by paper n3158.

Date: 2010-10-24.00:00:00

The Returns element of operator== says:

true only if the two objects refer to the same match

It is not really clear what this means: The current specification would allow for an implementation to return true, only if the address values of m1 and m2 are the same. While this approach is unproblematic in terms of used operations this is also a bit unsatisfactory. With identity equality alone there seems to be no convincing reason to provide this operator at all. It could for example also refer to an comparison based on iterator values. In this case a user should better know that this will be done, because there is no guarantee at all that inter-container comparison of iterators is a feasible operation. This was a clear outcome of the resolution provided in N3066 for LWG issue 446. It could also mean that a character-based comparison of the individual sub_match elements should be done - this would be equivalent to applying operator== to the subexpressions, prefix and suffix.

History
Date User Action Args
2010-11-18 14:01:09adminsetstatus: nad editorial -> resolved
2010-11-11 01:27:21adminsetstatus: new -> nad editorial
2010-10-25 00:09:15adminsetmessages: + msg5100
2010-10-24 00:00:00admincreate