public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/38304] New: Conflict with the STL standard. std::set<T>::iterator
@ 2008-11-28 14:52 sleary at vavi dot co dot uk
2008-11-28 15:13 ` [Bug libstdc++/38304] " paolo dot carlini at oracle dot com
0 siblings, 1 reply; 2+ messages in thread
From: sleary at vavi dot co dot uk @ 2008-11-28 14:52 UTC (permalink / raw)
To: gcc-bugs
All versions of the STL.
I realize it is probably not a good practise as right now the compiler forces
you not to mess with the ordering. But table 65 of container requirements
states iterator points to non-const T. There is no exception for std::set.
std::set<T>::iterator returns as const T.
This can be illustrated by the following example which fails to compile on all
GCC compilers.
http://codepad.org/U4yYQ29j
So one cannot call into objects in a set which breaches the standard.
If there is no will to repair this then perhaps we could have a warning that
while this is allowed in the standard it will not be supported in gcc? Thus
preventing time being lost attempting to resolve this when porting from other
compilers.
--
Summary: Conflict with the STL standard. std::set<T>::iterator
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sleary at vavi dot co dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38304
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/38304] Conflict with the STL standard. std::set<T>::iterator
2008-11-28 14:52 [Bug libstdc++/38304] New: Conflict with the STL standard. std::set<T>::iterator sleary at vavi dot co dot uk
@ 2008-11-28 15:13 ` paolo dot carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-11-28 15:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2008-11-28 15:11 -------
*** This bug has been marked as a duplicate of 14410 ***
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38304
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-28 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-28 14:52 [Bug libstdc++/38304] New: Conflict with the STL standard. std::set<T>::iterator sleary at vavi dot co dot uk
2008-11-28 15:13 ` [Bug libstdc++/38304] " paolo dot carlini at oracle dot com
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).