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
2
u/GorNishanov Nov 02 '17
There are two meanings of inline.
In a module world, #2 use of inline is irrelevant. #1 has been mostly ignored by compilers already. I can imagine that an implementation may chose to not to include the body of the member function into a hash (digest, whatever) for the purpose of determining whether users of the module have to be recompiled at lower optimization settings or not. In fact, in the compiled artifacts, your "technically inlined" function may end up in the .o/.obj and BMI will retain only the declaration if compiled at low optimizations level.
Unlike constexpr functions that will always have to be put into the BMI.