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
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
spec10.C
blob
e9d36ec318b01839fa8ca2415db9e0015d519d7e
1
// { dg-do run }
2
extern "C" void abort();
3
4
template <class T>
5
struct S
6
{
7
template <int i>
8
int f(int j) { abort(); return 0; }
9
};
10
11
template <>
12
template <>
13
int S<double>::f<7>(int j) { return j + 7; }
14
15
template <>
16
template <>
17
int S<double>::f<8>(int j) { return j + 8; }
18
19
int main()
20
{
21
S<double> s;
22
23
if (s.f<7>(3) != 10)
24
abort();
25
26
if (s.f<8>(3) != 11)
27
abort();
28
}