Title
regex_iterator and const correctness
Status
cd1
Section
[re.regiter]
Submitter
Daniel Krügler

Created on 2007-03-05.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

1) In ([re.regiter]/1) change the current declarations

bool operator==(const regex_iterator&) const;
bool operator!=(const regex_iterator&) const;
const value_type& operator*() const;
const value_type* operator->() const;

2) In [re.regiter.deref] change the following declarations

const value_type& operator*() const;
const value_type* operator->() const;

3) In [re.regiter.comp] change the following declarations

bool operator==(const regex_iterator& right) const;
bool operator!=(const regex_iterator& right) const;
Date: 2007-03-05.00:00:00

Both the class definition of regex_iterator ([re.regiter]/1) and the latter member specification ([re.regiter.comp]/1+2) declare both comparison operators as non-const functions. Furtheron, both dereference operators are unexpectedly also declared as non-const in [re.regiter]/1 as well as in ([re.regiter.deref]/1+2).

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