From mboxrd@z Thu Jan 1 00:00:00 1970 From: grendel@swcp.com To: gcc-gnats@gcc.gnu.org Subject: c++/4423: Template operator overloading using member functions and bound friend templates fails Date: Sat, 29 Sep 2001 23:56:00 -0000 Message-id: <20010930064852.14125.qmail@sourceware.cygnus.com> X-SW-Source: 2001-09/msg00581.html List-Id: >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: