(1)
//摘抄自 QT 的源文件
```cpp
// Use C++17 if statement with initializer. User's code ends up in a else so
// scoping of different ifs is not broken //从以下大概能看出来,是c++ 语言里的 for循环
#define Q_FOREACH_IMPL(variable, name, container) \
for (auto name = QtPrivate::qMakeForeachContainer(container); name.i != name.e; ++name.i) \
if (variable = *name.i; false) {} else
#define Q_FOREACH_JOIN(A, B) Q_FOREACH_JOIN_IMPL(A, B)
#define Q_FOREACH_JOIN_IMPL(A, B) A ## B
#define Q_FOREACH(variable, container) \
Q_FOREACH_IMPL(variable, Q_FOREACH_JOIN(_container_, __LINE__), container)
#define foreach Q_FOREACH // 可见, foreach 函数,是个宏定义,其函数名是个宏名字
#define Q_FOREVER for(;;)
(2)
谢谢