Replace =delete with SFINAE for invalid Vec integer methods#575
Open
chinmaychahar wants to merge 1 commit into
Open
Replace =delete with SFINAE for invalid Vec integer methods#575chinmaychahar wants to merge 1 commit into
chinmaychahar wants to merge 1 commit into
Conversation
|
|
…oftwareFoundation#559) Signed-off-by: maychin <chinmay.cc.06@gmail.com> Signed-off-by: chinmaychahar <chinmay.cc.06@gmail.com>
7ee36c5 to
33e84ff
Compare
Contributor
|
I think it's probably unwise to rely on either std::is_floating_point or std::is_integral. We should probably define our own extensible type trait that will capture what we really intend and be user-extensible and future-proof. |
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.
Summary
Fixes #559
Replace
= deletetemplate specializations with SFINAE using the existingIMATH_ENABLE_IFmacro forlength(),normalize(),normalizeExc(),normalizeNonNull(),normalized(),normalizedExc(), andnormalizedNonNull()in Vec2, Vec3, and Vec4.Removes the entire
Specializations for VecN<short>, VecN<int>block including the@cond Doxygen_Suppresswrapper which will no longer be needed when SFINAE makes the methods invisible to both the compiler and Doxygen for non-applicable types.Status
Draft PR. I will iterate based on feedback and open questions in #559