Title
Operator functions impossible to compare are defined in [re.submatch.op]
Status
cd1
Section
[re.submatch.op]
Submitter
Nozomu Katoo

Created on 2007-05-27.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Adopt the proposed resolution in N2409.

Date: 2007-05-27.00:00:00

In [re.submatch.op] of N2284, operator functions numbered 31-42 seem impossible to compare. E.g.:

template <class BiIter>
   bool operator==(typename iterator_traits<BiIter>::value_type const& lhs,
                    const sub_match<BiIter>& rhs);

-31- Returns: lhs == rhs.str().

When char* is used as BiIter, iterator_traits<BiIter>::value_type would be char, so that lhs == rhs.str() ends up comparing a char value and an object of std::basic_string<char>. However, the behaviour of comparison between these two types is not defined in [string.nonmembers] of N2284. This applies when wchar_t* is used as BiIter.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3425
2007-05-27 00:00:00admincreate