decl2.c (set_decl_namespace): Allow explicit instantiations in any namespace.
* decl2.c (set_decl_namespace): Allow explicit instantiations in any namespace. From-SVN: r39907
This commit is contained in:
parent
35ab11f05f
commit
2c0fc02de2
@ -1,3 +1,8 @@
|
||||
2001-02-19 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* decl2.c (set_decl_namespace): Allow explicit instantiations in
|
||||
any namespace.
|
||||
|
||||
2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
* optimize.c (expand_call_inline): Don't walk subtrees of type
|
||||
|
@ -4536,6 +4536,9 @@ set_decl_namespace (decl, scope, friendp)
|
||||
if (!old)
|
||||
/* No old declaration at all. */
|
||||
goto complain;
|
||||
/* A template can be explicitly specialized in any namespace. */
|
||||
if (processing_explicit_instantiation)
|
||||
return;
|
||||
if (!is_overloaded_fn (decl))
|
||||
/* Don't compare non-function decls with decls_match here,
|
||||
since it can't check for the correct constness at this
|
||||
|
5
gcc/testsuite/g++.old-deja/g++.ns/template15.C
Normal file
5
gcc/testsuite/g++.old-deja/g++.ns/template15.C
Normal file
@ -0,0 +1,5 @@
|
||||
// Build don't link:
|
||||
// Origin: Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
namespace X { template <class T> void f () {} }
|
||||
template void X::f<int> ();
|
Loading…
Reference in New Issue
Block a user