repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gdb6
/
gdb
/
testsuite
/
gdb.hp
/
gdb.objdbg
/
objdbg04
/
x.h
blob
9df8ef985566794e1b7f1b50ce74e9545da9609b
1
template
<
class
T
>
2
class
Adder
{
3
public
:
4
void
set
(
T
);
5
T
get
();
6
T
add
(
T
);
7
8
private
:
9
T val
;
10
};
11
12
template
<
class
T
>
13
void
Adder
<
T
>::
set
(
T new_val
)
14
{
15
val
=
new_val
;
16
}
17
18
template
<
class
T
>
19
T Adder
<
T
>::
get
()
20
{
21
return
val
;
22
}
23
24
template
<
class
T
>
25
T Adder
<
T
>::
add
(
T new_val
)
26
{
27
val
+=
new_val
;
28
return
val
;
29
}
30