Last change
on this file since 334 was
163,
checked in by karaoui, 13 years ago
|
changing mover to memo
changing soft.bin to soft.elf
...
|
File size:
493 bytes
|
Line | |
---|
1 | // -*- c++ -*- |
---|
2 | |
---|
3 | #ifndef DPP_FOREACH_HH_ |
---|
4 | #define DPP_FOREACH_HH_ |
---|
5 | |
---|
6 | #ifdef __GNUC__ |
---|
7 | |
---|
8 | #define FOREACH(var, cont) \ |
---|
9 | for (typeof((cont).begin()) var = (cont).begin(); \ |
---|
10 | var !=(cont).end(); \ |
---|
11 | ++var) |
---|
12 | |
---|
13 | // this version prefetch next item to allow current item deletion on some container |
---|
14 | #define FOREACH2(var, cont) \ |
---|
15 | for (typeof((cont).begin()) var##__next = (cont).begin(), var; \ |
---|
16 | (var = var##__next++) !=(cont).end(); ) |
---|
17 | |
---|
18 | #else |
---|
19 | # error typeof not available |
---|
20 | #endif |
---|
21 | |
---|
22 | #endif |
---|
23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.