[#DB35784268F127494FAA20500D80777B005712D9]
Return the address as a string.
templateStringToken::result_type to_string(StringToken&& token) const;
The returned string does not contain surrounding square brackets.
When called with no arguments, the return type is `std::string`. Otherwise, the return type and style of output is determined by which string token is passed.
ipv6_address::bytes_type b = {{
0, 1, 0, 2, 0, 3, 0, 4,
0, 5, 0, 6, 0, 7, 0, 8 }};
ipv6_address a(b);
assert(a.to_string() == "1:2:3:4:5:6:7:8");
assert( ipv4_address(0x01020304).to_string() == "1.2.3.4" );
Constant.
Strong guarantee. Calls to allocate may throw. String tokens may throw exceptions.