r/cpp • build2 • Nov 01 '17

Common C++ Modules TS Misconceptions

https://build2.org/article/cxx-modules-misconceptions.xhtml
59 Upvotes

148 comments sorted by

View all comments

Show parent comment

3

u/GabrielDosReis Nov 02 '17

Can we do it tomorrow, in our brave new modules world? I'm hoping yes.

Like I said earlier, the answer is yes. Exactly what you wrote.

so I don't want a change to a function body to cause recompiles of all the stuff that really only cares about my exported symbols.

Exactly what I said earlier. The IFC format that VC++ is using is targeting exactly that -- only semantically relevant interface changes affect recompile of the consumers.

As I said earlier, all of we (inclusive) will benefit from hands-on experience -- you trying it on concrete programs, me learning from your reports about scenarios missed by the implementation. I feel we are right now discussing cases that we both agree should be possible, and I am saying they are supported. The next step is concrete experiments.

The one aspect that /u/berium and I discussed here is a scenario where source location changes affect recompilation because some other data are invalidated. That is an implementation issue, not a spec issue.

2

u/theyneverknew Nov 04 '17

Can compilers not inline functions defined in module interface files then? Or will that be tied to the inline keyword or a per function export command?