我猜/希望模块名称不会与变量名称冲突。有人可以证实这一点,并可能参考(即将发布的)标准中的合适部分吗?
文件:a_module.cc
export module a_module;
export int add(int a, int b) { return a + b; }
// Question-1: Is using 'a_module' below as variable name allowed, or does
// the 'export module a_module' above prevent us from using that name?
int a_module = 11;
文件:main.cc
import a_module;
// Question-2: Is using 'a_module' below as variable name fine, or does the
// 'import a_module' above prevent us from using that name?
int a_module = 42;
int main() { return add(1, 2); }