Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define foreach_ptr__(a, index_name, element_name, array) if(0) finished##a: ; else for(auto element_name = &(array).elements[0];;) if(1) goto body##a; else while(1) if(1) goto finished##a; else body##a: for(int index_name = 0; index_name < (array).count && (bool)(element_name = &(array)[index_name]); index_name++)
- #define foreach_ptr_(a, index_name, element_name, array) foreach_ptr__(a, index_name, element_name, array)
- #define foreach_ptr(index_name, element_name, array) foreach_ptr_(__LINE__, index_name, element_name, array)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement