Skip to content

AST: add a workaround for VS2017 #26111

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

Merged
merged 1 commit into from
Jul 12, 2019
Merged

Conversation

compnerd
Copy link
Member

Unfortunately, VS2017 does not support the SFINAE expression. This
means that it attempts to parse the Index < sizeof...(Types) as a
template parameter resulting in a parse failure. This normalises the
constraint to 0 < sizeof...(Types) - Index
(sizeof...(Types) - Index > 0) which is then wrapped into a ternary to
explicitly convert it to a boolean. This repairs the builds on VS2017.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Unfortunately, VS2017 does not support the SFINAE expression.  This
means that it attempts to parse the `Index < sizeof...(Types)` as a
template parameter resulting in a parse failure.  This normalises the
constraint to `0 < sizeof...(Types) - Index`
(`sizeof...(Types) - Index > 0`) which is then wrapped into a ternary to
explicitly convert it to a boolean.  This repairs the builds on VS2017.
@compnerd
Copy link
Member Author

CC: @DougGregor

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

1 similar comment
@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9abc323

@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd
Copy link
Member Author

Going to merge this to unbreak the bots.

@compnerd compnerd merged commit 37db587 into swiftlang:master Jul 12, 2019
@compnerd compnerd deleted the complexity-is-key branch July 12, 2019 21:13
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.

2 participants