Closed
Conversation
Differential Revision: D10400927 Differential Version: 60767206
This was referenced Oct 16, 2018
Differential Revision: D10400927 Differential Version: 60767408
Differential Revision: D10400927 Differential Version: 60767896
Differential Revision: D10400927 Differential Version: 60895750
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Oct 22, 2018
Summary: Pull Request resolved: pytorch/pytorch#12706 If both branches are valid C++ code independent from the type passed in, then we can just use if/else inside of a constexpr function to decide between the cases. Only if one branch would be invalid code (say because type T doesn't have a default constructor), we'd need "constexpr if" or SFINAE. Reviewed By: ezyang Differential Revision: D10400927 fbshipit-source-id: 16d9855913af960b68ee406388d6b9021bfeb34a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack:
:white_circle: #12307 Add TypeMeta::New/Delete 💚
:black_circle: #12706 [wip] Simplify typeid SFINAE 💛
If both branches are valid C++ code independent from the type passed in, then we can just use if/else inside of a constexpr function
to decide between the cases. Only if one branch would be invalid code (say because type T doesn't have a default constructor), we'd
need "constexpr if" or SFINAE.
Differential Revision: D10400927