|
767 | 767 |
|
768 | 768 | \begin{itemdescr} |
769 | 769 | \pnum |
770 | | -\returns |
| 770 | +\returns |
771 | 771 | \begin{itemize} |
772 | 772 | \item |
773 | 773 | if \tcode{a.is_v4() != b.is_v4()}, \tcode{false}; |
|
795 | 795 |
|
796 | 796 | \begin{itemdescr} |
797 | 797 | \pnum |
798 | | -\returns |
| 798 | +\returns |
799 | 799 | \begin{itemize} |
800 | 800 | \item |
801 | 801 | if \tcode{a.is_v4() \&\& !b.is_v4()}, \tcode{true}; |
|
854 | 854 |
|
855 | 855 | \begin{itemdescr} |
856 | 856 | \pnum |
857 | | -\effects Converts a textual representation of an address into an object of class \tcode{address}, as if by calling: |
| 857 | +\effects Converts a textual representation of an address into an object of class \tcode{address}, as if by calling: |
858 | 858 | \begin{codeblock} |
859 | 859 | address a; |
860 | 860 | address_v6 v6a = make_address_v6(str, ec); |
|
1229 | 1229 |
|
1230 | 1230 | \begin{itemdescr} |
1231 | 1231 | \pnum |
1232 | | -\returns An \tcode{address_v4} object corresponding to the IPv4-mapped IPv6 address, as if computed by the following method: |
| 1232 | +\returns An \tcode{address_v4} object corresponding to the IPv4-mapped IPv6 address, as if computed by the following method: |
1233 | 1233 | \begin{codeblock} |
1234 | 1234 | address_v6::bytes_type v6b = a.to_bytes(); |
1235 | 1235 | address_v4::bytes_type v4b(v6b[12], v6b[13], v6b[14], v6b[15]); |
|
1477 | 1477 |
|
1478 | 1478 | \begin{itemdescr} |
1479 | 1479 | \pnum |
1480 | | -\returns A boolean indicating whether the \tcode{address_v6} object represents a multicast address, as if computed by the following method: |
| 1480 | +\returns A boolean indicating whether the \tcode{address_v6} object represents a multicast address, as if computed by the following method: |
1481 | 1481 | \begin{codeblock} |
1482 | 1482 | bytes_type b = to_bytes(); |
1483 | 1483 | return b[0] == 0xFF; |
|
1492 | 1492 |
|
1493 | 1493 | \begin{itemdescr} |
1494 | 1494 | \pnum |
1495 | | -\returns A boolean indicating whether the \tcode{address_v6} object represents a unicast link-local address, as if computed by the following method: |
| 1495 | +\returns A boolean indicating whether the \tcode{address_v6} object represents a unicast link-local address, as if computed by the following method: |
1496 | 1496 | \begin{codeblock} |
1497 | 1497 | bytes_type b = to_bytes(); |
1498 | 1498 | return b[0] == 0xFE && (b[1] & 0xC0) == 0x80; |
|
1507 | 1507 |
|
1508 | 1508 | \begin{itemdescr} |
1509 | 1509 | \pnum |
1510 | | -\returns A boolean indicating whether the \tcode{address_v6} object represents a unicast site-local address, as if computed by the following method: |
| 1510 | +\returns A boolean indicating whether the \tcode{address_v6} object represents a unicast site-local address, as if computed by the following method: |
1511 | 1511 | \begin{codeblock} |
1512 | 1512 | bytes_type b = to_bytes(); |
1513 | 1513 | return b[0] == 0xFE && (b[1] & 0xC0) == 0xC0; |
|
1522 | 1522 |
|
1523 | 1523 | \begin{itemdescr} |
1524 | 1524 | \pnum |
1525 | | -\returns A boolean indicating whether the \tcode{address_v6} object represents an IPv4-mapped IPv6 address, as if computed by the following method: |
| 1525 | +\returns A boolean indicating whether the \tcode{address_v6} object represents an IPv4-mapped IPv6 address, as if computed by the following method: |
1526 | 1526 | \begin{codeblock} |
1527 | 1527 | bytes_type b = to_bytes(); |
1528 | 1528 | return b[ 0] == 0 && b[ 1] == 0 && b[ 2] == 0 && b[ 3] == 0 |
|
1716 | 1716 |
|
1717 | 1717 | \begin{itemdescr} |
1718 | 1718 | \pnum |
1719 | | -\returns An \tcode{address_v6} object containing the IPv4-mapped IPv6 address corresponding to the specified IPv4 address, as if computed by the following method: |
| 1719 | +\returns An \tcode{address_v6} object containing the IPv4-mapped IPv6 address corresponding to the specified IPv4 address, as if computed by the following method: |
1720 | 1720 | \begin{codeblock} |
1721 | 1721 | address_v4::bytes_type v4b = a.to_bytes(); |
1722 | 1722 | address_v6::bytes_type v6b(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
2715 | 2715 | \requires \tcode{proto == protocol_type::v4() || proto == protocol_type::v6()}. |
2716 | 2716 |
|
2717 | 2717 | \pnum |
2718 | | -\postconditions |
| 2718 | +\postconditions |
2719 | 2719 | \begin{itemize} |
2720 | 2720 | \item |
2721 | 2721 | If \tcode{proto == protocol_type::v6()}, \tcode{this->address() == ip::address_v6()}; otherwise, \tcode{this->address() == ip::address_v4()}. |
|
2866 | 2866 |
|
2867 | 2867 | \begin{itemdescr} |
2868 | 2868 | \pnum |
2869 | | -\effects Outputs a representation of the endpoint to the stream, as if it were implemented as follows: |
| 2869 | +\effects Outputs a representation of the endpoint to the stream, as if it were implemented as follows: |
2870 | 2870 | \begin{codeblock} |
2871 | 2871 | basic_ostringstream<CharT, Traits> ss; |
2872 | 2872 | if (ep.protocol() == basic_endpoint<InternetProtocol>::protocol_type::v6()) |
|
0 commit comments