public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8465: GCC 3.2 rejects legal overloads of template member functions
@ 2002-11-05 10:56 jacques.bouchard
  0 siblings, 0 replies; 2+ messages in thread
From: jacques.bouchard @ 2002-11-05 10:56 UTC (permalink / raw)
  To: gcc-gnats


>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)


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

* Re: c++/8465: GCC 3.2 rejects legal overloads of template member functions
@ 2002-11-05 11:30 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-11-05 11:30 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jacques.bouchard, nobody

Synopsis: GCC 3.2 rejects legal overloads of template member functions

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Tue Nov  5 11:30:10 2002
State-Changed-Why:
    This is fixed in 3.2.1 and 3.3

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8465


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

end of thread, other threads:[~2002-11-05 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 10:56 c++/8465: GCC 3.2 rejects legal overloads of template member functions jacques.bouchard
2002-11-05 11:30 bangerth

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).