repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* Makefile.in: Rebuilt.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ns
/
template12.C
blob
5a6869cb4e1074bba3d3a63c1d53859126a5910f
1
// Build don't link:
2
// Templates can be defined outside of the namespace if the have been declared
3
// inside
4
namespace bar
5
{
6
template <typename T>
7
T const foo(T const &);
8
template<> const int foo<int>(int const &);
9
}
10
11
template <typename T>
12
T const
13
bar::foo(T const &a)
14
{
15
return a;
16
}
17
18
template<> const int bar::foo<int>(int const &){return 0;}
19