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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [range-for17.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options -std=c++0x }
2
 
3
extern "C" int printf (const char *, ...);
4
 
5
enum E { e1, e2, e3, X };
6
E operator*(E e) { return e; }
7
E begin(E e) { return e; }
8
E end(E e) { return X; };
9
E operator++(E& e) { return e = E(e+1); }
10
 
11
int main()
12
{
13
  for (auto e: e1)
14
    {
15
      printf ("%d ", e);
16
    }
17
}

powered by: WebSVN 2.1.0

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