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
Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git]
/
libvtv
/
testsuite
/
libvtv.cc
/
event.h
blob
61e1d7c917265b56761d6bda0a9ce37b05215835
1
class
RefCountedBase
{
2
protected
:
3
bool
derefBase
()
4
{
5
return true
;
6
}
7
};
8
9
template
<
typename T
>
class
RefCounted
:
public
RefCountedBase
{
10
public
:
11
void
deref
()
12
{
13
if
(
derefBase
())
14
delete static_cast
<
T
*>(
this
);
15
}
16
17
protected
:
18
// RefCounted() { }
19
~
RefCounted
()
20
{
21
}
22
};
23
24
25
class
Event
:
public
RefCounted
<
Event
> {
26
public
:
27
Event
();
28
virtual
~
Event
();
29
};