public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: jacques.bouchard@noos.fr
To: gcc-gnats@gcc.gnu.org
Subject: c++/8465: GCC 3.2 rejects legal overloads of template member functions
Date: Tue, 05 Nov 2002 10:56:00 -0000	[thread overview]
Message-ID: <20021105185126.32586.qmail@sources.redhat.com> (raw)


>Number:         8465
>Category:       c++
>Synopsis:       GCC 3.2 rejects legal overloads of template member functions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 05 10:56:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jacques Bouchard
>Release:        Reading specs from /usr//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
>Organization:
>Environment:
Mandrake Linux 9.0 / Pentium II
>Description:
GCC 3.2 can't compile the test-case overload.cpp listed in How-To-Repeat. Alexandrescu's loki-lib contains code like that (MultiMethods.h/FnDispatcher::Add()), so it can't be compiled either.

g++ overload.cpp

overload.cpp:5: `template<class T, bool flag> void A::f()' and `template<class T> void A::f()' cannot be overloaded
overload.cpp: In function `int main()':
overload.cpp:11: no matching function for call to `A::f()'
>How-To-Repeat:
// file overload.cpp

struct A {
	template <typename T>           void f() { }
	template<typename T, bool flag> void f() { }
};

int main() {
	A a;
	a.f<int>();
	a.f<int, true>();
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
 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 (Mandrake Linux 9.0 3.2-1mdk)


             reply	other threads:[~2002-11-05 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05 10:56 jacques.bouchard [this message]
2002-11-05 11:30 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021105185126.32586.qmail@sources.redhat.com \
    --to=jacques.bouchard@noos.fr \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).