asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

Consider whether the address iterator members can be constexpr

Open chriskohlhoff opened this issue 10 years ago • 2 comments

chriskohlhoff avatar Feb 27 '15 10:02 chriskohlhoff

And range members.

chriskohlhoff avatar Feb 27 '15 10:02 chriskohlhoff

Pre-Lenexa Summary

[internet.address.iter], [internet.address.range]

Is it possible for the iterator and range members to be made constexpr? Is there a use case to justify it?

One potential use case is to find a successor address as a constant expression. E.g.:

constexpr ip::address_v4 next = *++ip::address_v4_iterator(ip::address_v4::loopback());

chriskohlhoff avatar May 05 '15 09:05 chriskohlhoff