This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13399] New: G++ 3.3 fails to match the templatized, overloaded operator for subtypes defined in the class template
- From: "wirawan0 at softhome dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2003 15:05:35 -0000
- Subject: [Bug c++/13399] New: G++ 3.3 fails to match the templatized, overloaded operator for subtypes defined in the class template
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
G++ version 3.3 _DOES_ accept templatized operator definition for a class
template's subtype, yet when it _FAILS_ to find this pattern when it comes to an
actual call to that operator. Is this against C++ standard? I don't think so (or
at least it should not have been so). I put more detail on the attachment. But
the kind of template declaration that fails is like this:
template <class param_type>
inline bool operator||(typename Class<param_type>::Subtype &c1,
typename Class<param_type>::Subtype &c2)
{
return c1.x || c2.x;
}
VERSION KNOWN TO BE AFFECTED: 3.2.2, 3.3.1
$ /usr/local/bin/g++ -v
Reading specs from
/usr/local/gcc-3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs
Configured with: ./configure --prefix=/usr/local/gcc-3.3.1 --disable-nls
--enable-languages=c,c++,f77
Thread model: posix
gcc version 3.3.1
$ g++ -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --enable-long-long
--enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
--
Summary: G++ 3.3 fails to match the templatized, overloaded
operator for subtypes defined in the class template
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wirawan0 at softhome dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13399