Menu

#15 for each to work over plain C arrays

ext
open
nobody
3
2007-03-19
2007-03-19
Jan Ringoš
No

Currently the for each "construct" (macro) is implemented to use .begin() and .end() of whatever you pass in. Although this is enough also for std::tr1::arrays, is definitely does not work for C arrays. I would like to have it work that way either but I still wasn't able to find the correct way to implement this. Staticaly. I came up with two solutions: one makes use of a virtual inheritance (which is really big overhead for simple iteration] and the second would require the new semantics of the "auto" keyword. Will post samples later...

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.