This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++11 status.
basic_string missing definitions forcbegin /cend /crbegin /crendSection: 27.4.3.4[string.iterators]Status:C++11Submitter: Jonathan WakelyOpened: 2009-08-14Last modified: 2016-01-28
Priority:Not Prioritized
View all issues withC++11 status.
Discussion:
Unlike the containers in clause 23,basic_string has definitions forbegin() andend(), but these have not been updated to includecbegin,cend,crbegin andcrend.
[2009-10-28 Howard:]
Moved to Tentatively NAD after 5 positive votes on c++std-lib. Addedrationale.
[2009-10-28 Alisdair disagrees:]
I'm going to have to speak up as the dissenting voice.
I agree the issue could be handled editorially, and that would be mypreference if Pete feels this is appropriate. Failing that, I reallythink this issue should be accepted and moved to ready. The otherbegin/end functions all have a semantic definition for this template,and it is confusing if a small few are missing.
I agree that an alternative would be to strikeall the definitions for
begin/end/rbegin/rendand defer completely to the requirements tables inclause 23. I think that might be confusing without a forward referencethough, as those tables are defined in alater clause than thebasic_stringtemplate itself. If someone wants to pursue this I wouldsupport it, but recommend it as a separate issue.So my preference is strongly to move Ready over NAD, and a strongerpreference for NAD Editorial if Pete is happy to make these changes.
[2009-10-29 Howard:]
Moved to Tentatively Ready after 5 positive votes on c++std-lib. Removedrationale to mark it NAD. :-)
Proposed resolution:
Add to 27.4.3.4[string.iterators]
iterator begin();const_iterator begin() const;const_iterator cbegin() const;...
iterator end();const_iterator end() const;const_iterator cend() const;...
reverse_iterator rbegin();const_reverse_iterator rbegin() const;const_reverse_iterator crbegin() const;...
reverse_iterator rend();const_reverse_iterator rend() const;const_reverse_iterator crend() const;