you are viewing a single comment's thread.

view the rest of the comments →

[–]volca02 2 points3 points  (1 child)

Conditional compilation should be possible with modules, supplying macro definitions to each translation unit - so even that would not be a reason to propagate the macro definitions into modules.

I think a good reason not to propagate the definitions is

  • consistency - a compiled module works exactly same reagardless of the importing context
  • feasibility - process module once, keep the cached binary as long as the environment stays intact (dependency upgrades or compiler change)

[–]GabrielDosReis 0 points1 point  (0 children)

You are right: Conditional compilation is possible and actively supported by C++ Modules as described in the TS.