包括模块的守卫

Include guards for modules

这可能是一个荒谬的问题,我对答案有 99% 的把握,但我想确定一下。

C++20 modules do not require any type of include guards for module interface files.

我的说法正确吗?到目前为止,我所读到的关于模块的所有内容都让我相信不需要守卫,因为模块只编译一次,然后为导入该模块的每个翻译单元重复使用。

不需要包含守卫。模块只导入一次。

预处理器定义不会从模块中逃逸,因此无论如何包含守卫都不起作用。

Macros, preprocessor directives, and non-exported names declared in a module are not visible and therefore have no effect on the compilation of the translation unit that imports the module.