[SERVER-43646] Upgrade MSVC to VS2019 or newer. Created: 25/Sep/19  Updated: 27/Oct/23  Resolved: 22/Dec/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: ADAM Martin (Inactive) Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-44315 Fix compile using Visual Studio 2019 Closed
Assigned Teams:
Server Development Platform
Sprint: Dev Tools 2019-10-07
Participants:

 Description   

MSVC 19.xx has had some serious teething problems with its new "improvements" to how it handles templates.  Many have been fixed.

 

We should rev the supported version from 19.16 to some more recent version.  I'm asking for people to add comments to this ticket with links to godbolt examples of where gcc, clang, and a more recent MSVC do the right thing but MSVC 19.16 does the wrong thing.

 

The godbolt examples should run across 4 compilers:  MSVC 19.16, a later MSVC 19.xx where the feature works (if possible), gcc 8.3 and clang 7.0.  The expectation is that clang and gcc are doing the right thing, in these examples.



 Comments   
Comment by Andrew Morrow (Inactive) [ 22/Dec/21 ]

We have already upgraded to VS2019 and we are well on our way to upgrading to VS2022 at this point.

Comment by Andrew Morrow (Inactive) [ 10/Oct/19 ]

adam.martin - Yes, the versioning scheme is weird. As is the VS vs VC distinction.

Comment by Andrew Morrow (Inactive) [ 09/Oct/19 ]

Putting this in the V4 toolchain epic where we will be considering a move to VS 2019 or newer.

Comment by Andrew Morrow (Inactive) [ 02/Oct/19 ]

adam.martin - I don't entirely understand. According to the linked table, _MSC_VER = 1916 is the last version of MSVC that comes with VS 2017, our current compiler of record, and _MSC_VER = 1920 is part of VS 2019.

Also, calling these MSVC 19 is very confusing (this is Microsoft's fault).

I think what you are actually saying is that [MSVC++ 14.16 _MSC_VER == 1916 (Visual Studio 2017 version 15.9)] is buggy, but that [MSVC++ 14.2 _MSC_VER == 1920 (Visual Studio 2019 Version 16.0)] is less so. If that is correct, than this ticket is equivalent to asking that we upgrade to VS 2019, which is not a minor version bump, but a toolchain upgrade.

Comment by ADAM Martin (Inactive) [ 25/Sep/19 ]

https://godbolt.org/z/wSsCaH

MSVC 19.16 doesn't handle if-constexpr initializer statements.  19.20 does.

Generated at Thu Feb 08 05:03:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.