c++/348: Re: g++ 2.95.2 doesn't recognize explicit instantiation outside namespace

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun Jun 25 14:16:00 GMT 2000


>Number:         348
>Category:       c++
>Synopsis:       g++ 2.95.2 doesn't recognize explicit instantiation outside namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          analyzed
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 25 14:16:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Martin Sebor <sebor@roguewave.com>
>Release:        2.95.2
>Organization:
Rogue Wave Software, Inc.
>Environment:
>Description:
 Original-Message-ID: <395597A6.68CA542C@roguewave.com>
 Date: Sat, 24 Jun 2000 23:24:54 -0600
 

 The following program fails to compile with g++ 2.95.2. This causes many
 Perennial tests to fail.

 Regards
 Martin


 $ cat test.cpp

 namespace N {

 template <class T>
 void foo (T) { }
 }

 template void N::foo<int> (int);

 int main () { }

 $ g++ test.cpp
 test.cpp:9: `N::foo(int)' should have been declared inside `N'

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-prs mailing list