public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18721] New: template conversion function regression
@ 2004-11-29 17:09 belz at kolumbus dot fi
  2004-11-29 17:12 ` [Bug c++/18721] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: belz at kolumbus dot fi @ 2004-11-29 17:09 UTC (permalink / raw)
  To: gcc-bugs

Bug #9126 is well known, however it seems the current g++ 4.0.0 cvs version does 
not even allow overloading a templated conversion function.

struct A {
    template<typename T>
    operator T() const;

    operator float() const;
};


$ g++ templ_conv.cpp
templ_conv.cpp:6: error: declaration of 'A::operator float() const'
templ_conv.cpp:4: error: conflicts with previous declaration 'A::operator T() 
const'

I have tested with many 4.0.0 versions, the last one was:

$ g++ -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --enable-languages=c++,c --enable-
threads=posix
Thread model: posix
gcc version 4.0.0 20041129 (experimental)


Mikael

-- 
           Summary: template conversion function regression
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belz at kolumbus dot fi
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-12-17 16:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 17:09 [Bug c++/18721] New: template conversion function regression belz at kolumbus dot fi
2004-11-29 17:12 ` [Bug c++/18721] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-29 17:51 ` pinskia at gcc dot gnu dot org
2004-11-29 23:45 ` pinskia at gcc dot gnu dot org
2004-11-29 23:46 ` mmitchel at gcc dot gnu dot org
2004-12-17 11:41 ` nathan at gcc dot gnu dot org
2004-12-17 11:41 ` nathan at gcc dot gnu dot org
2004-12-17 16:00 ` nathan at gcc dot gnu dot org
2004-12-17 16:17 ` nathan 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).