MIRA
|
Macro for iterating over all elements in a container. More...
#include <boost/foreach.hpp>
#include <boost/version.hpp>
#include <boost/typeof/typeof.hpp>
Go to the source code of this file.
Namespaces | |
boost | |
Macros | |
#define | foreach BOOST_FOREACH |
This macro provides a more convenient name for BOOST_FOREACH. More... | |
#define | foreach_reverse BOOST_REVERSE_FOREACH |
This macro provides a more convenient name for BOOST_REVERSE_FOREACH. 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 BOOST_FOREACH |
This macro provides a more convenient name for BOOST_FOREACH.
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 BOOST_REVERSE_FOREACH |
This macro provides a more convenient name for BOOST_REVERSE_FOREACH.
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