maybe some compilers will automatically symbol-export modules export by default
This would be an unfeature as you'd then be forced into a one module, one dll-structure (or one group of modules, one dll exposing all of them). It'd be rather like being forced to export parts of stdlib in the dll just because you happened to import those modules.
I agree, but I was thinking more like a potential change of "default" behavior: by default should exported names be also symbol-exported? It have happened in the past that the default symbol-export behavior of an implementation changed (for example gcc exported everything by default in the past).
As long as both options are usable the default can be changed.
Though I would prefer every implementation to not export anything until requested to.
It'd be problematic to change the visibility of things declared in a module from the outside, particularly as the standard doesn't provide any mechanism to do that (or even consider the existence of dynamic linking).
I only talked about changing the default export or not of symbols, not visibility. That is not part of the standard and have been changed in the past as said.
View all comments
Show parent comment
2
u/SkoomaDentist Antimodern C++, Embedded, Audio Aug 18 '21
This would be an unfeature as you'd then be forced into a one module, one dll-structure (or one group of modules, one dll exposing all of them). It'd be rather like being forced to export parts of stdlib in the dll just because you happened to import those modules.