Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-67069

Pass /Zc:lambda to MSVC

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Dev Platform 2022-06-27

      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.

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: