OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [expr/] [static_cast3.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
template  struct static_abort {};
2
 
3
template 
4
struct any
5
{
6
  const E& self() const { return static_cast(*this); }
7
};
8
 
9
struct range : public any
10
{
11
  range() {}
12
 
13
  template 
14
  range(const U&)
15
  {
16
    typedef typename static_abort::ret t;
17
  }
18
};
19
 
20
int main()
21
{
22
  const any& r = *new range();
23
  r.self();
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.