This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/4423: Template operator overloading using member functions and bound friend templates fails
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/4423: Template operator overloading using member functions and bound friend templates fails
- From: grendel at swcp dot com
- Date: 30 Sep 2001 06:48:52 -0000
- Reply-To: grendel at swcp dot com
>Number: 4423
>Category: c++
>Synopsis: Template operator overloading using member functions and bound friend templates fails
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Sat Sep 29 23:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Bill Reynolds
>Release: unknown-1.0
>Organization:
>Environment:
Linux Redhat 7.0 i686
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
>Description:
g++ cannot disambiguate two overloads of operator* if the arguments are templates and the class doing the overloading
uses both member fn overloads and friend template fn overloads.
Following code gives the compile error. This code compiles on
the Comeau online compiler, and as far as I can tell is
legal code.
>How-To-Repeat:
>Fix:
See (commented out) workaround in code.
>Release-Note:
>Audit-Trail:
>Unformatted: