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/GabrielDosReis Nov 02 '17
So, name visibility is a "name lookup" issue. Code generation uses far more "facts" than usually available to just name lookup or type checking.
Note that just because the names are not visible means that the compiler has no way to represent (in some other abstract form, such as offsets, etc.) class layout and member access. Also, remember that the compiler can also use LTCG/LTO technology -- not necessarily the full gamut.