Passing template parameter packs to std::map doesn't work in VS 2017/2019, so this updates the preprocessor version check to use an alternate version in VS2019, as well.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Checking https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-160 this LGTM.
I can land this for you, but it would also make a good test commit once you have access. Let me know.
Whoops, I did not realize my VS was out of date - appreciate the link. Let me try building with the latest updates, perhaps a later version works.
Re: Testing committing this with commit access would be great, thank you.
Ah, my Windows Boot Camp partition seems to have bit it, so it may be a couple days before I can test & update this, sorry. Please hold off.
Sorry, this got a little complicated. On my previous install I had VS 2019 16.5, which ran into the compile error. When I reinstalled, 16.0, 16.6, and 16.9 worked, but 16.4/16.5 did not. Sounds like a super tiny regression for only 2 minor updates. As far as the actual issue, I could not fully understand it, but it seems to have something to do with applying parameter pack arguments while also using default values for std::map template parameters.
For the actual patch, we could:
- Leave the version number check at 1926 and update the comment to mention 16.4/16.5 not building is known.
- Update the preprocessor check to version >= 1920 (which is VS2019 16.0) and != 1924/1925 (16.4/16.5). I'm guessing most people are upgraded past 16.4/16.5 though, so a preprocessor check for those versions may not be used all that much in practice...and would probably hang around the code base forever ;).
Thanks,
Neal
Leave the version number check at 1926 and update the comment to mention 16.4/16.5 not building is known.
I'd do that. If a few versions get the #else version when they could use the first version, it's not going to change much.