public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here
@ 2012-01-13  1:05 marcus-yass at ihug dot co.nz
  2012-01-13  1:08 ` [Bug c++/51841] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marcus-yass at ihug dot co.nz @ 2012-01-13  1:05 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51841
           Summary: iterator weirdness. I couldn't tell you what's going
                    on here
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marcus-yass@ihug.co.nz


Whenever I start using vector::iterators I start running into a variety of
completely unhelpful[probably delusional] compile errors. Attached is a simple,
perfectly reasonable source file that provokes such an error.

compilation: g++-4.6 -std=c++0x 1.cpp

As you can see you get comparable results from using a bare sub-class that has
a similar position as vector::iterators.


In the less trivial source file I got the complaint "porousVect.cpp:67:36:
error: ‘std::vector<T, std::allocator<T> >::iterator’ is not a type".

It so /is/. If you'd like to look at that one too I'll strip it down and post
it for you.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/51841] iterator weirdness. I couldn't tell you what's going on here
  2012-01-13  1:05 [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here marcus-yass at ihug dot co.nz
@ 2012-01-13  1:08 ` pinskia at gcc dot gnu.org
  2012-01-13  1:22 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-13  1:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|delusional compile errors   |iterator weirdness. I
                   |sequent to using template   |couldn't tell you what's
                   |dependent                   |going on here
                   |vector<T>::iterators        |
           Severity|major                       |normal

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-13 01:08:00 UTC ---
Are you using auto; if not try using auto instead of naming the full type? If
you don't want to do that then do you have the typename keyword in front of
std::vector<T>::iterator ; if not then that is your bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/51841] iterator weirdness. I couldn't tell you what's going on here
  2012-01-13  1:05 [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here marcus-yass at ihug dot co.nz
  2012-01-13  1:08 ` [Bug c++/51841] " pinskia at gcc dot gnu.org
@ 2012-01-13  1:22 ` redi at gcc dot gnu.org
  2012-01-13  1:39 ` marcus-yass at ihug dot co.nz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-13  1:22 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-01-13
     Ever Confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-13 01:22:16 UTC ---
(In reply to comment #0)
> Attached is a simple,

The attachment is missing


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/51841] iterator weirdness. I couldn't tell you what's going on here
  2012-01-13  1:05 [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here marcus-yass at ihug dot co.nz
  2012-01-13  1:08 ` [Bug c++/51841] " pinskia at gcc dot gnu.org
  2012-01-13  1:22 ` redi at gcc dot gnu.org
@ 2012-01-13  1:39 ` marcus-yass at ihug dot co.nz
  2012-01-13  1:40 ` pinskia at gcc dot gnu.org
  2012-01-13  2:05 ` marcus-yass at ihug dot co.nz
  4 siblings, 0 replies; 6+ messages in thread
From: marcus-yass at ihug dot co.nz @ 2012-01-13  1:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from mako <marcus-yass at ihug dot co.nz> 2012-01-13 01:38:46 UTC ---
Created attachment 26311
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26311
simple code


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/51841] iterator weirdness. I couldn't tell you what's going on here
  2012-01-13  1:05 [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here marcus-yass at ihug dot co.nz
                   ` (2 preceding siblings ...)
  2012-01-13  1:39 ` marcus-yass at ihug dot co.nz
@ 2012-01-13  1:40 ` pinskia at gcc dot gnu.org
  2012-01-13  2:05 ` marcus-yass at ihug dot co.nz
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-13  1:40 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-13 01:40:00 UTC ---
void actv(vector<T>::iterator in){

You are missing the typename keyword.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/51841] iterator weirdness. I couldn't tell you what's going on here
  2012-01-13  1:05 [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here marcus-yass at ihug dot co.nz
                   ` (3 preceding siblings ...)
  2012-01-13  1:40 ` pinskia at gcc dot gnu.org
@ 2012-01-13  2:05 ` marcus-yass at ihug dot co.nz
  4 siblings, 0 replies; 6+ messages in thread
From: marcus-yass at ihug dot co.nz @ 2012-01-13  2:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from mako <marcus-yass at ihug dot co.nz> 2012-01-13 02:05:24 UTC ---
(In reply to comment #4)
> void actv(vector<T>::iterator in){
> 
> You are missing the typename keyword.

Thanks a bunch, Andrew. I didn't know about this. The internet hasn't served as
a very good teacher for me.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-13  2:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-13  1:05 [Bug c++/51841] New: iterator weirdness. I couldn't tell you what's going on here marcus-yass at ihug dot co.nz
2012-01-13  1:08 ` [Bug c++/51841] " pinskia at gcc dot gnu.org
2012-01-13  1:22 ` redi at gcc dot gnu.org
2012-01-13  1:39 ` marcus-yass at ihug dot co.nz
2012-01-13  1:40 ` pinskia at gcc dot gnu.org
2012-01-13  2:05 ` marcus-yass at ihug dot co.nz

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).