cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/

Foreach emulation

See also
http://www.artima.com/cppsource/foreach.html
Utilities:

Cxxomfort implements emulation of C++11's "foreach" or for(item: collection), for systems without C++11.

The interface is provided via the CXXO_FOREACH macro and is used as follows:

deque<int> dq;
// add elements to dq...
// later:
CXXO_FOREACH(int v , dq) {
// operate on the elements...
}

This feature allows working with sequences and ranges transparently up to the limits established by the compiler. Currently foreach support in cxxomfort goes as follows:

See Also

See also
Boost.Foreach
the Eric Niebler's article on FOREACH.
"I12N (initialization)"