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] - Rev 774
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-options -std=c++0x }
extern "C" int printf (const char *, ...);
enum E { e1, e2, e3, X };
E operator*(E e) { return e; }
E begin(E e) { return e; }
E end(E e) { return X; };
E operator++(E& e) { return e = E(e+1); }
int main()
{
for (auto e: e1)
{
printf ("%d ", e);
}
}
Go to most recent revision | Compare with Previous | Blame | View Log