c++/3073: template member function gives error

darren@flyingcolor.com darren@flyingcolor.com
Thu Jun 7 03:46:00 GMT 2001


>Number:         3073
>Category:       c++
>Synopsis:       template member function gives error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 07 03:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     darren@flyingcolor.com
>Release:        unknown-1.0
>Organization:
>Environment:
gcc version 2.95.2 20000220 (Debian GNU/Linux)
>Description:
A class member function that is a template must appear
before it is used. If it appears after it is used it gives
"Internal compiler error.".

Probably fixed in 3.0 - it compiles at
codesourcery.com's form.
>How-To-Repeat:
g++ -c test2.cpp
Putting run() after process() compiles.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-cppfile; name="test2.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test2.cpp"

DQpjbGFzcyBCSVhTZXR7DQppbnQgels0XTsNCnB1YmxpYzoNCnZvaWQgZihCSVhTZXQgJm90aGVy
KXsNCnpbMF09b3RoZXIuelswXTsNCn0NCg0KfTsNCg0KY2xhc3MgVGVzdENhc2Uyew0KcHVibGlj
Og0KQklYU2V0IGEsYjsNCg0KcHVibGljOg0Kdm9pZCBydW4odm9pZCl7DQpCSVhTZXQgeCx5Ow0K
cHJvY2VzcygwLHgseSk7DQp9DQoNCnByb3RlY3RlZDoNCnRlbXBsYXRlPGNsYXNzIEJTPiB2b2lk
IHByb2Nlc3MoY29uc3QgaW50IGQsQlMgJmVuLEJTICZsYil7DQphLmYoZW4pO2IuZihsYik7DQp9
DQoNCn07



More information about the Gcc-bugs mailing list