Include guards for modules

  c++, c++20, visual-c++

This may be a ridiculous question and I’m 99% sure of the answer but I wanted to be sure.

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

Is my statement correct? Everything I’ve read about modules thus far leads me to believe that guards are not required as modules are only ever compiled once and then reused for each translation unit that imports that module.

Source: Windows Questions C++

LEAVE A COMMENT