MIRA
|
Macro for iterating over all elements in a container. More...
#include <boost/range/adaptor/reversed.hpp>
Go to the source code of this file.
Macros | |
#define | foreach(i, c) for (i : c) |
The macro allows a PERL-or JAVA-like "foreach" construct that automates the iteration over containers or other sequences that provide iterator concepts. More... | |
#define | foreach_reverse(i, c) for (i : boost::adaptors::reverse(c)) |
The macro can be used similar to foreach, but the containers are traversed in reverse order. More... | |
#define | foreachIt(var, container) for (auto var = container.begin(); var != container.end(); ++var) |
This macro provides a more convenient way for iterating over containers or other sequences that provide iterator concepts. More... | |
Macro for iterating over all elements in a container.
#define foreach | ( | i, | |
c | |||
) | for (i : c) |
The macro allows a PERL-or JAVA-like "foreach" construct that automates the iteration over containers or other sequences that provide iterator concepts.
Examples:
Supported sequence types:
For more details see: http://www.boost.org/doc/libs/1_43_0/doc/html/foreach.html
#define foreach_reverse | ( | i, | |
c | |||
) | for (i : boost::adaptors::reverse(c)) |
The macro can be used similar to foreach, but the containers are traversed in reverse order.
For more details see: http://www.boost.org/doc/libs/1_43_0/doc/html/foreach.html
#define foreachIt | ( | var, | |
container | |||
) | for (auto var = container.begin(); var != container.end(); ++var) |
This macro provides a more convenient way for iterating over containers or other sequences that provide iterator concepts.
In contrast to the foreach macros above, this macro provides an iterator instead of the iterated value.
Examples:
In fact, this macro is a simple replacement for