summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/template12.C
blob: 32dfe0f2c87df8e10ee5a0d76d16e23f4c2a78ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// Templates can be defined outside of the namespace if the have been declared
// inside
namespace bar
{
  template <typename T>
  T const foo(T const &);
  template<> const int foo<int>(int const &);
}

template <typename T>
T const
bar::foo(T const &a)
{
  return a;
}

template<> const int bar::foo<int>(int const &){return 0;}