Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issues preventing compilation on VS 2022 17.1. #2000

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

jedieaston
Copy link
Contributor

@jedieaston jedieaston commented Mar 4, 2022


For some reason1, Visual Studio 2022's newest update (17.1.0) made source breaking changes to the C++ compiler. In two instances, these prevented winget from compiling. I believe @yao-msft was running into these issues in #1990, but here's the fix.

Basically, there was a conformance change to the compiler where if you had a static_assert that could be evaluated without knowing the type, then the compiler would always evaluate it to the same value. Many of the static_assert calls that were checking to see if a type had an override had to be made dependent on the type so the compiler wouldn't optimize the check away.

More reading here: https://docs.microsoft.com/en-us/cpp/overview/cpp-conformance-improvements?view=msvc-170#error-on-a-non-dependent-static_assert

Microsoft Reviewers: Open in CodeFlow

Footnotes

  1. Most likely because engagement with the 17.0 error list was too low ;)

@jedieaston jedieaston requested a review from a team as a code owner March 4, 2022 12:48
@yao-msft
Copy link
Contributor

yao-msft commented Mar 4, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft yao-msft merged commit 92e662e into microsoft:master Mar 4, 2022
@jedieaston jedieaston deleted the false-but-not-always branch March 5, 2022 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants