Skip to content
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

Generalize arithmetic operators for socket_base and derived #470

Merged
merged 2 commits into from
Mar 10, 2021
Merged

Generalize arithmetic operators for socket_base and derived #470

merged 2 commits into from
Mar 10, 2021

Conversation

albestro
Copy link
Contributor

Close #469

As mentioned in the issue and the referred comment, this PR is in particular needed for the migration to Catch2, which exposed that these operators were not covering some cases (e.g. socket_ref vs socket_t).

This generalization is based on polymorphism and improves const correctness, without exploiting custom cast operators of socket_ref and socket_t (indeed, it is not so clear to me the situation of these conversion functions, and their const correctness).

@gummif has for sure insight on this and may want to give a final feedback on this.

@albestro albestro mentioned this pull request Jan 21, 2021
@sigiesec sigiesec changed the title Genealize arithmetic operators for socket_base and derived Generalize arithmetic operators for socket_base and derived Jan 22, 2021
@sigiesec sigiesec merged commit 1a4ebda into zeromq:master Mar 10, 2021
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.

Improve socket comparison operators (needed for Catch2)
3 participants