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
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
expr
/
static_cast3.C
blob
744648c3f45ef2486a46cf0e7d801cea4c57d404
1
template <class T> struct static_abort {};
2
3
template <class E>
4
struct any
5
{
6
const E& self() const { return static_cast<const E&>(*this); }
7
};
8
9
struct range : public any<range>
10
{
11
range() {}
12
13
template <class U>
14
range(const U&)
15
{
16
typedef typename static_abort<U>::ret t;
17
}
18
};
19
20
int main()
21
{
22
const any<range>& r = *new range();
23
r.self();
24
}