c++/3950: address of a template member function

papadopo@shfj.cea.fr papadopo@shfj.cea.fr
Mon Aug 6 11:46:00 GMT 2001


>Number:         3950
>Category:       c++
>Synopsis:       address of a template member function
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 06 11:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     papadopo@shfj.cea.fr
>Release:        2.95.3
>Organization:
>Environment:

>Description:
Taking the address of a template member function is possible

* in egcs 1.1.2 (and gcc 3.0) using
	&method<int>

* in Red Hat's gcc 2.96 (and gcc 3.0) using
	&Class::method<int>

It's not possible at all using gcc 2.95.3.

I wonder whether gcc 2.95.* could be fixed to accept
one of these.
>How-To-Repeat:
Save attachment to bug.cc.
Execute 'g++ -c bug.cc' using GCC 2.95.3.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.cc"

c3RydWN0IENsYXNzIHsKICAgIHZvaWQgbWV0aG9kKCk7CiAgICB0ZW1wbGF0ZSA8dHlwZW5hbWUg
VD4gc3RhdGljIHZvaWQgZm9vKCk7Cn07Cgp2b2lkIENsYXNzOjptZXRob2QoKSB7CiAgICAvLyBl
Y2dzIDEuMS4yOiBPSwogICAgLy8gZ2NjIDIuOTUuMzogaW50ZXJuYWwgY29tcGlsZXIgZXJyb3Ig
PC0tLQogICAgLy8gZ2NjIDIuOTY6ICAgaW50ZXJuYWwgY29tcGlsZXIgZXJyb3IKICAgIC8vIGdj
YyAzLjA6ICAgIE9LCiAgICB2b2lkICgqYm9vMSkoKSA9ICZmb288aW50PjsKICAgIC8vIGVjZ3Mg
MS4xLjI6IGludGVybmFsIGNvbXBpbGVyIGVycm9yCiAgICAvLyBnY2MgMi45NS4zOiBpbnRlcm5h
bCBjb21waWxlciBlcnJvciA8LS0tCiAgICAvLyBnY2MgMi45NjogICBPSwogICAgLy8gZ2NjIDMu
MDogICAgT0sKICAgIHZvaWQgKCpib28yKSgpID0gJkNsYXNzOjpmb288aW50PjsKfQo=



More information about the Gcc-bugs mailing list