r/cpp • u/cpppm MSVC Game Dev PM • Sep 14 '20
Standard C++20 Modules support with MSVC in Visual Studio 2019 version 16.8 | C++ Team Blog
https://devblogs.microsoft.com/cppblog/standard-c20-modules-support-with-msvc-in-visual-studio-2019-version-16-8/
254
Upvotes
46
u/starfreakclone MSVC FE Dev Sep 15 '20
Hi Minimonium,
I am sorry you feel that the team at MS has violated the rules set out in the standard. As /u/GabrielDosReis mentions, the IS today allows for such a model so the decision was made, collectively by the toolset team, to support the strong ownership model. The strong ownership model really should be preferred for the purposes of hardening library code and truly isolating entity definitions.
As far as addressing your concern about writing portable code across clang/gcc/MSVC: there is still an avenue for this. The MSVC toolset does still implement the weak ownership model, though it is not on by default. Projects wishing to use the weaker form will get the usual linker errors which surface in the example from the blog.
> If you write code for the weak model it might fail to compile on the strong model
Can you elaborate on this? It is not obvious to me how this can happen.