-
Notifications
You must be signed in to change notification settings - Fork 226
Implement relops for arguments always resulting in false. #627
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
Implement relops for arguments always resulting in false. #627
Conversation
vissarion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's useful, thanks!
| struct equals_always_false | ||
| { | ||
| template <typename Geometry1, typename Geometry2, typename Strategy> | ||
| static inline bool apply(Geometry1 const& , Geometry2 const& , Strategy const& ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: & ) -> &) :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mloskot Well idk ;) do we have gudelines for that? AFAIU we put space after & and before , so I assumed that the missing name is represented by space. Or am I mistaken and all of the spaces should be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK we don't have a written guideline for that.
I find this readable, but I'm also fine with &)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having nothing constructive to say, I went nit-picking and bike-shedding. Certainly, ignoreable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly nice to hear from you Mateusz!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Barend, I'm happy to be revolving around still
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I saw this in Geometry code but it is possible that it was me who put it in the first place. I don't have an opinion regarding it, but if it's ignorable I'll leave it as it is. ;)
|
So this is only for geometry-type-combinations which can, by definition, never return |
|
@barendgehrels Yes, other cases are already handled. There is no combination which always results in |
Great, thanks |
| struct equals_always_false | ||
| { | ||
| template <typename Geometry1, typename Geometry2, typename Strategy> | ||
| static inline bool apply(Geometry1 const& , Geometry2 const& , Strategy const& ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK we don't have a written guideline for that.
I find this readable, but I'm also fine with &)
|
Thanks for reviews. |
The purpose is to simplify writing generic code with relational operations. Consider e.g.:
before: compilation error,
this PR: compiles and always returns
false.