Commit 0858179b authored by Dominik Charousset's avatar Dominik Charousset

Fix to_string output of embedded v4 subnets

parent 785edce6
...@@ -87,6 +87,8 @@ int ipv6_subnet::compare(const ipv6_subnet& other) const noexcept { ...@@ -87,6 +87,8 @@ int ipv6_subnet::compare(const ipv6_subnet& other) const noexcept {
} }
std::string to_string(ipv6_subnet x) { std::string to_string(ipv6_subnet x) {
if (x.embeds_v4())
return to_string(x.embedded_v4());
auto result = to_string(x.network_address()); auto result = to_string(x.network_address());
result += '/'; result += '/';
result += std::to_string(x.prefix_length()); result += std::to_string(x.prefix_length());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment