public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/27404] New: Rope iterators are not InputIterators @ 2006-05-02 21:43 doug dot gregor at gmail dot com 2006-05-03 0:08 ` [Bug libstdc++/27404] " pcarlini at suse dot de ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: doug dot gregor at gmail dot com @ 2006-05-02 21:43 UTC (permalink / raw) To: gcc-bugs Rope iterators (both const and mutable) do not meet the requirements of an Input Iterator, because their dereference operator only operates on non-const objects. Table 72 of the C++98 Standard requires the valid expression *a, where a is a const iterator, but this valid expression does not work with a non-const operator*. To fix, make operator* and everything it relies on "const". This might have an unfortunate ripple effect; an alternative (but ugly) approach would be to add a new operator* to _Rope_iterator and _Rope_const_iterator that const_cast's and forwards: reference operator*() const { return *const_cast<_Rope_iterator&>(*this); } reference operator*() const { return *const_cast<_Rope_const_iterator&>(*this); } This problem is very unlikely to cause problems in user code, but it makes ConceptGCC sad. -- Summary: Rope iterators are not InputIterators Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: doug dot gregor at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27404 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/27404] Rope iterators are not InputIterators 2006-05-02 21:43 [Bug libstdc++/27404] New: Rope iterators are not InputIterators doug dot gregor at gmail dot com @ 2006-05-03 0:08 ` pcarlini at suse dot de 2006-05-04 9:39 ` paolo at gcc dot gnu dot org 2006-05-04 9:40 ` pcarlini at suse dot de 2 siblings, 0 replies; 4+ messages in thread From: pcarlini at suse dot de @ 2006-05-03 0:08 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pcarlini at suse dot de 2006-05-03 00:08 ------- Hi Doug. I'm afraid that, everything considered - in particular the status of the rope extension - we have to go with the ugly approach: things like _Rope_iterator::_M_check() actively do change the object... -- pcarlini at suse dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-05-03 00:08:30 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27404 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/27404] Rope iterators are not InputIterators 2006-05-02 21:43 [Bug libstdc++/27404] New: Rope iterators are not InputIterators doug dot gregor at gmail dot com 2006-05-03 0:08 ` [Bug libstdc++/27404] " pcarlini at suse dot de @ 2006-05-04 9:39 ` paolo at gcc dot gnu dot org 2006-05-04 9:40 ` pcarlini at suse dot de 2 siblings, 0 replies; 4+ messages in thread From: paolo at gcc dot gnu dot org @ 2006-05-04 9:39 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from paolo at gcc dot gnu dot org 2006-05-04 09:38 ------- Subject: Bug 27404 Author: paolo Date: Thu May 4 09:37:56 2006 New Revision: 113519 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113519 Log: 2006-05-04 Douglas Gregor <dgregor@cs.indiana.edu> PR libstdc++/27404 * include/ext/rope (_Rope_const_iterator<>::operator*() const, _Rope_iterator<>::operator*() const): Add. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/ext/rope -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27404 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/27404] Rope iterators are not InputIterators 2006-05-02 21:43 [Bug libstdc++/27404] New: Rope iterators are not InputIterators doug dot gregor at gmail dot com 2006-05-03 0:08 ` [Bug libstdc++/27404] " pcarlini at suse dot de 2006-05-04 9:39 ` paolo at gcc dot gnu dot org @ 2006-05-04 9:40 ` pcarlini at suse dot de 2 siblings, 0 replies; 4+ messages in thread From: pcarlini at suse dot de @ 2006-05-04 9:40 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from pcarlini at suse dot de 2006-05-04 09:40 ------- Fixed. -- pcarlini at suse dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27404 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-04 9:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-05-02 21:43 [Bug libstdc++/27404] New: Rope iterators are not InputIterators doug dot gregor at gmail dot com 2006-05-03 0:08 ` [Bug libstdc++/27404] " pcarlini at suse dot de 2006-05-04 9:39 ` paolo at gcc dot gnu dot org 2006-05-04 9:40 ` pcarlini at suse dot de
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).