-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add IPAddr#+/- #71
base: master
Are you sure you want to change the base?
Add IPAddr#+/- #71
Conversation
I logged the build failure as #73 EDIT: I merged fixes to the CI, so @taketo1113, if you rebase this on top of latest, it ought to run tests right. |
@olleolleolle Thanks for fixing ci build error. |
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.
If this effectively introduces the concept of delta of IP addresses, does ipaddr1 - ipaddr2
make sense if they share the address family?
@knu No. I think it is not an introduction to the concept of delta. The use case I was thinking of is a human friendly calculation of addresses.
|
One more question: should |
I think it should be valid operation, because it just calculates the IP Address (which is not address block or network mask) like the bitwise operator of
|
Add +/- methods to get an ipaddr instance greater/less than the original address by offset.
the current
IPAddr#succ
only return next address, thisIPAddr#+
return any address with offset.