Skip to content

Conversation

@awulkiew
Copy link
Member

The purpose is to simplify writing generic code with relational operations. Consider e.g.:

bg::equals(linestring, polygon);
bg::touches(point, linestring);
bg::crosses(point, linestring);
bg::overlaps(point, linestring);

before: compilation error,
this PR: compiles and always returns false.

@vissarion vissarion self-requested a review October 17, 2019 13:08
Copy link
Member

@vissarion vissarion left a 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& )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: & ) -> &) :-)

Copy link
Member Author

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?

Copy link
Collaborator

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 &)

Copy link
Member

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

Copy link
Collaborator

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!

Copy link
Member

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

Copy link
Member Author

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. ;)

@barendgehrels
Copy link
Collaborator

So this is only for geometry-type-combinations which can, by definition, never return true?

@awulkiew
Copy link
Member Author

@barendgehrels Yes, other cases are already handled. There is no combination which always results in true.

@barendgehrels
Copy link
Collaborator

@barendgehrels Yes, other cases are already handled. There is no combination which always results in true.

Great, thanks

struct equals_always_false
{
template <typename Geometry1, typename Geometry2, typename Strategy>
static inline bool apply(Geometry1 const& , Geometry2 const& , Strategy const& )
Copy link
Collaborator

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 &)

@awulkiew
Copy link
Member Author

Thanks for reviews.

@awulkiew awulkiew added this to the 1.72 milestone Oct 19, 2019
@awulkiew awulkiew merged commit ba5face into boostorg:develop Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants