This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ 2.95.2 doesn't recognize explicit instantiation outside namespace


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'

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]