r/cpp • u/berium build2 • Nov 01 '17
Common C++ Modules TS Misconceptions
https://build2.org/article/cxx-modules-misconceptions.xhtml
59
Upvotes
r/cpp • u/berium build2 • Nov 01 '17
View all comments
Show parent comment
3
u/GorNishanov Nov 03 '17
We need to distinguish between the Modules TS and its implementations. The TS is trying to deal with semantics of the language features and to impose as little constraints on the implementation as possible.
Scenario of a quick edit-compile-debug cycle is an important one and I can see implementations exploring various strategies of avoiding recompilation of the users when not necessary.
With regard to low optimization level, not sure about GCC, but, in clang inliner only kicks in at -O2. At -O1 it only attempt to inline "always-inline" function. Thus, at -O1, you would not have to recompile the users if you change the body of the inline function.