public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/15523] New: Can't have vectors of vector::const_iterator
@ 2004-05-19 12:25 bangerth at dealii dot org
  2004-05-19 13:00 ` [Bug libstdc++/15523] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: bangerth at dealii dot org @ 2004-05-19 12:25 UTC (permalink / raw)
  To: gcc-bugs

I definitely like the debug mode in libstdc++, but happened to fall over this: 
----------------- 
#include <vector> 
 
int main () 
{ 
  std::vector<std::vector<int>::const_iterator> x(2); 
} 
----------------- 
 
When compiled with -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC, I got this: 
 
homes/csm2/bangerth/bin/gcc-3.4.0/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/debug/safe_iterator.h:125: 
    error: attempt to copy-construct an iterator from a singular iterator. 
 
Objects involved in the operation: 
iterator "this" @ 0x0x8067ee0 { 
type = 
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKiN10__gnu_norm6vectorIiSaIiEEEEEN15__gnu_debug_def6vectorIiS7_EEEE 
(constant iterator); 
  state = singular; 
} 
iterator "other" @ 0x0xbfffdd40 { 
type = 
N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKiN10__gnu_norm6vectorIiSaIiEEEEEN15__gnu_debug_def6vectorIiS7_EEEE 
(constant iterator); 
  state = singular; 
} 
 
 
For some reason, I fail to see why I shouldn't be allowed to copy-construct from an 
invalid iterator. After all, the result would still be invalid and couldn't be dereferenced, no? 
I think this should be allowed. 
 
W.

-- 
           Summary: Can't have vectors of vector::const_iterator
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15523


^ permalink raw reply	[flat|nested] 21+ messages in thread
[parent not found: <bug-15523-102@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2009-08-04 13:04 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-19 12:25 [Bug libstdc++/15523] New: Can't have vectors of vector::const_iterator bangerth at dealii dot org
2004-05-19 13:00 ` [Bug libstdc++/15523] " pinskia at gcc dot gnu dot org
2004-05-19 22:58 ` [Bug libstdc++/15523] New: " llewelly
2004-05-19 23:07 ` [Bug libstdc++/15523] " llewelly at xmission dot com
2004-05-20 15:16 ` bangerth at dealii dot org
2004-05-20 18:43   ` llewelly
2004-05-20 18:43 ` sebor at roguewave dot com
2004-05-21  6:17   ` llewelly
2004-05-20 18:43 ` llewelly at xmission dot com
2004-05-20 18:43 ` bangerth at ices dot utexas dot edu
2004-05-20 18:43   ` llewelly
2004-05-20 18:43 ` llewelly at xmission dot com
2004-05-20 19:27 ` bangerth at ices dot utexas dot edu
2004-05-21  9:21 ` llewelly at xmission dot com
2004-05-25 14:33 ` bkoz at gcc dot gnu dot org
2004-06-20  6:53 ` [Bug libstdc++/15523] [DR 408] " pinskia at gcc dot gnu dot org
2004-06-20  6:53 ` pinskia at gcc dot gnu dot org
2005-01-13 13:30 ` polzin_spamprotect_ at gmx dot de
     [not found] <bug-15523-102@http.gcc.gnu.org/bugzilla/>
2009-08-04 11:19 ` paolo dot carlini at oracle dot com
2009-08-04 13:01 ` paolo at gcc dot gnu dot org
2009-08-04 13:04 ` 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).