public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30754]  New: mystefying error "type A is not derived from type B"
@ 2007-02-10  3:06 benoit dot hudson at gmail dot com
  2007-02-10  9:17 ` [Bug c++/30754] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: benoit dot hudson at gmail dot com @ 2007-02-10  3:06 UTC (permalink / raw)
  To: gcc-bugs

#include <vector>
template <class C>
class Cow {
  typedef std::vector<C> vect;
  typedef vect::iterator it;
};

On line 5, the iterator typedef, I get the very odd error that (reconstituting
the types) vect::iterator is not derived from type Cow<C>.

It took me rather a long time to figure out that what it meant is that I needed
to write:
  typedef typename vect::iterator it;
How in the world did this get turned into an error about how "type A is not
derived from type B" ?

This is gcc-3.4, 4.0, and 4.1 ; 3.2 and 3.3 warn me it's implicitely a
typename.


-- 
           Summary: mystefying error "type A is not derived from type B"
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benoit dot hudson at gmail dot com


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


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

* [Bug c++/30754] mystefying error "type A is not derived from type B"
  2007-02-10  3:06 [Bug c++/30754] New: mystefying error "type A is not derived from type B" benoit dot hudson at gmail dot com
@ 2007-02-10  9:17 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-10  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-02-10 09:17 -------


*** This bug has been marked as a duplicate of 15179 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2007-02-10  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-10  3:06 [Bug c++/30754] New: mystefying error "type A is not derived from type B" benoit dot hudson at gmail dot com
2007-02-10  9:17 ` [Bug c++/30754] " pinskia at gcc dot gnu dot org

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