public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19434] New: this->baseMemberTemplate<T>() in derived doesnt compile
@ 2005-01-14  0:38 johill at lanl dot gov
  2005-01-14  0:41 ` [Bug c++/19434] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: johill at lanl dot gov @ 2005-01-14  0:38 UTC (permalink / raw)
  To: gcc-bugs

The attached snippet does not compile with the attached compiler version.

class base {
protected:
    template <class P,class T> P fred ( T & ) {return 0;};
};

template <class T>
class derived : public base {
public:
    void jane () {T t; this->fred<int>(t);}
};

main ()
{
    derived<double> d;
    d.jane ();
}

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-42)

-- 
           Summary: this->baseMemberTemplate<T>() in derived doesnt compile
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: johill at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


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


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

* [Bug c++/19434] this->baseMemberTemplate<T>() in derived doesnt compile
  2005-01-14  0:38 [Bug c++/19434] New: this->baseMemberTemplate<T>() in derived doesnt compile johill at lanl dot gov
@ 2005-01-14  0:41 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-14  0:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-14 00:41 -------
This is a dup of one of the most reported bugs, PR 795.  And it is fixed in 3.4.0.
The workaround is to do:
this->template fred<int>(t);

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

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |rejects-valid
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-01-14  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-14  0:38 [Bug c++/19434] New: this->baseMemberTemplate<T>() in derived doesnt compile johill at lanl dot gov
2005-01-14  0:41 ` [Bug c++/19434] " 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).