Can someone explain me the macro:
#define tr(c,it) for( typeof(c.begin()) it=c.begin(); it!=c.end(); ++it )
Plz stress on use of typeof and why this macro can be used for all the containers.
# | User | Rating |
---|---|---|
No items |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 171 |
2 | awoo | 164 |
3 | adamant | 161 |
4 | TheScrasse | 159 |
5 | maroonrk | 154 |
5 | nor | 154 |
7 | -is-this-fft- | 152 |
8 | Petr | 146 |
8 | orz | 146 |
10 | pajenegod | 144 |
Macro
Can someone explain me the macro:
#define tr(c,it) for( typeof(c.begin()) it=c.begin(); it!=c.end(); ++it )
Plz stress on use of typeof and why this macro can be used for all the containers.
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en2 | rahul_1234 | 2015-06-29 15:20:55 | 2 | Tiny change: ' ++it )_\n__\nPlz stre' - | ||
en1 | rahul_1234 | 2015-06-29 15:19:26 | 201 | Initial revision (published) |
Name |
---|