From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xavier.Decoret@imag.fr To: gcc-gnats@gcc.gnu.org Subject: c++/3560: Problem with template enum Date: Wed, 04 Jul 2001 08:46:00 -0000 Message-id: <20010704154518.4827.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00101.html List-Id: >Number: 3560 >Category: c++ >Synopsis: Problem with template enum >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Jul 04 08:46:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Xavier Decoret >Release: gcc version 3.0 >Organization: >Environment: i686-pc-linux-gnu >Description: when compiled, the attached file gives: main.C:7: invalid use of undefined type `enum Foo::Exceptions' main.C:6: forward declaration of `enum Foo::Exceptions' If you remove the template argument (which is actually unused) then it compiles. >How-To-Repeat: template class Foo { public: enum Exceptions { A,B,C }; void foo() throw(Exceptions) { } }; int main() { return 0; } >Fix: dunnot know :-) >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="main.C" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="main.C" CnRlbXBsYXRlIDxjbGFzcyBUPgpjbGFzcyBGb28KewpwdWJsaWM6CiAgZW51bSBFeGNlcHRpb25z IHsgQSxCLEMgfTsKICB2b2lkIGZvbygpIHRocm93KEV4Y2VwdGlvbnMpCiAgICB7CiAgICB9Cn07 CgppbnQgbWFpbigpCnsKICByZXR1cm4gMDsKfQo=