-
Notifications
You must be signed in to change notification settings - Fork 38
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
Convert Ipv{4,6}Network::new to const functions #137
Conversation
IpNetwork::new cannot be const since it is not supported with the ? operator Closes #111
Too bad Maybe it's not worth working around it even. Not sure how important it would be to be able to have IP networks in constants, it still works to have it as a |
@faern I will keep a watch on replies here to see if that is something people might need. |
I see now that So it would be possible to have I'm not proposing we add this special constructor now. I just want to drop the idea and link here, so |
The standard library |
Aaah. Wait.. If |
Doh.... Another roadblock. Making |
That plus the chosen error type makes this function pretty useless? Is there any way to use Even if you use
|
IpNetwork::new cannot be const since it is not supported with the ?
operator
Closes #111