[SERVER-67069] Pass /Zc:lambda to MSVC Created: 07/Jun/22 Updated: 29/Oct/23 Resolved: 23/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Alex Neben |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Dev Platform 2022-06-27 |
| Participants: |
| Description |
|
Until we are on C+20, we should pass /Zc:lambda to msvc. It is implied by /std:c+20 and higher, but must be passed explicitly before then. It will tell msvc to use a standards-conforming lambda parser rather than whatever it is they were doing before. This was recomended by the MSVC team in response to a bug I filed about hitting an ICE. It is probably worth doing this on any branch with a new enough MSVC that we still backport to in order to minimize surprising compiler errors when backporting. On older version of MSVC 2019 it was spelled /experimental:newLambdaProcessor, but the documentation seems to imply that it is just a different spelling of the same flag. |
| Comments |
| Comment by Githook User [ 23/Jun/22 ] |
|
Author: {'name': 'Alexander Neben', 'email': 'alexander.neben@mongodb.com', 'username': 'IamXander'}Message: |
| Comment by Githook User [ 23/Jun/22 ] |
|
Author: {'name': 'Alexander Neben', 'email': 'alexander.neben@mongodb.com', 'username': 'IamXander'}Message: |