kelteseth / arewemodulesyet

https://arewemodulesyet.org/
MIT License
37 stars 11 forks source link

Add list of code pattern that are hostile to modules #13

Open kelteseth opened 7 months ago

kelteseth commented 7 months ago

https://www.reddit.com/r/cpp/comments/1cdtabj/comment/l1hbkxk/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

kelteseth commented 7 months ago

STL commented:

Named modules can't emit macros, so either they need to be replaced with real language tech (e.g. INT_MIN => numeric_limits::min()) or a companion macro-only header needs to be provided.

Macros defined on the command-line can affect a module when it's built, but not macros defined within source files. The latter was always a risky idea for headers, but now it really needs to be avoided for modules.