|
1482 | 1482 | also referred to as narrow
|
1483 | 1483 | string literals. A narrow string literal has type
|
1484 | 1484 | \indextext{literal!string!type~of}%
|
1485 |
| -``array of \term{n} \tcode{const char}'', where \term{n} is the size of |
| 1485 | +``array of \textit{n} \tcode{const char}'', where \textit{n} is the size of |
1486 | 1486 | the string as defined below, and has static storage
|
1487 | 1487 | duration~(\ref{basic.stc}).
|
1488 | 1488 |
|
|
1495 | 1495 | \indextext{literal!string!\idxcode{char16_t}}%
|
1496 | 1496 | A \grammarterm{string-literal} that begins with \tcode{u}, such as \tcode{u"asdf"}, is
|
1497 | 1497 | a \tcode{char16_t} string literal. A \tcode{char16_t} string literal has
|
1498 |
| -type ``array of \term{n} \tcode{const char16_t}'', where \term{n} is the |
| 1498 | +type ``array of \textit{n} \tcode{const char16_t}'', where \textit{n} is the |
1499 | 1499 | size of the string as defined below; it
|
1500 | 1500 | is initialized with the given characters. A single \grammarterm{c-char} may
|
1501 | 1501 | produce more than one \tcode{char16_t} character in the form of
|
|
1505 | 1505 | \indextext{literal!string!\idxcode{char32_t}}%
|
1506 | 1506 | A \grammarterm{string-literal} that begins with \tcode{U}, such as \tcode{U"asdf"}, is
|
1507 | 1507 | a \tcode{char32_t} string literal. A \tcode{char32_t} string literal has
|
1508 |
| -type ``array of \term{n} \tcode{const char32_t}'', where \term{n} is the |
| 1508 | +type ``array of \textit{n} \tcode{const char32_t}'', where \textit{n} is the |
1509 | 1509 | size of the string as defined below; it
|
1510 | 1510 | is initialized with the given characters.
|
1511 | 1511 |
|
|
1519 | 1519 | \indextext{\idxcode{wchar_t}}%
|
1520 | 1520 | \indextext{literal!string!wide}%
|
1521 | 1521 | \indextext{prefix!\idxcode{L}}%
|
1522 |
| -A wide string literal has type ``array of \term{n} \tcode{const |
1523 |
| -wchar_t}'', where \term{n} is the size of the string as defined below; it |
| 1522 | +A wide string literal has type ``array of \textit{n} \tcode{const |
| 1523 | +wchar_t}'', where \textit{n} is the size of the string as defined below; it |
1524 | 1524 | is initialized with the given characters.
|
1525 | 1525 |
|
1526 | 1526 | \pnum
|
|
1707 | 1707 | \pnum
|
1708 | 1708 | A \grammarterm{user-defined-literal} is treated as a call to a literal operator or
|
1709 | 1709 | literal operator template~(\ref{over.literal}). To determine the form of this call for a
|
1710 |
| -given \grammarterm{user-defined-literal} \term{L} with \grammarterm{ud-suffix} \term{X}, |
1711 |
| -the \grammarterm{literal-operator-id} whose literal suffix identifier is \term{X} is |
1712 |
| -looked up in the context of \term{L} using the rules for unqualified name |
1713 |
| -lookup~(\ref{basic.lookup.unqual}). Let \term{S} be the set of declarations found by |
1714 |
| -this lookup. \term{S} shall not be empty. |
| 1710 | +given \grammarterm{user-defined-literal} \textit{L} with \grammarterm{ud-suffix} \textit{X}, |
| 1711 | +the \grammarterm{literal-operator-id} whose literal suffix identifier is \textit{X} is |
| 1712 | +looked up in the context of \textit{L} using the rules for unqualified name |
| 1713 | +lookup~(\ref{basic.lookup.unqual}). Let \textit{S} be the set of declarations found by |
| 1714 | +this lookup. \textit{S} shall not be empty. |
1715 | 1715 |
|
1716 | 1716 | \pnum
|
1717 |
| -If \term{L} is a \grammarterm{user-defined-integer-literal}, let \term{n} be the literal |
1718 |
| -without its \grammarterm{ud-suffix}. If \term{S} contains a literal operator with |
1719 |
| -parameter type \tcode{unsigned long long}, the literal \term{L} is treated as a call of |
| 1717 | +If \textit{L} is a \grammarterm{user-defined-integer-literal}, let \textit{n} be the literal |
| 1718 | +without its \grammarterm{ud-suffix}. If \textit{S} contains a literal operator with |
| 1719 | +parameter type \tcode{unsigned long long}, the literal \textit{L} is treated as a call of |
1720 | 1720 | the form
|
1721 | 1721 |
|
1722 | 1722 | \begin{codeblock}
|
1723 |
| -operator "" @\term{X}@(@\term{n}@ULL) |
| 1723 | +operator "" @\textit{X}@(@\textit{n}@ULL) |
1724 | 1724 | \end{codeblock}
|
1725 | 1725 |
|
1726 |
| -Otherwise, \term{S} shall contain a raw literal operator or a literal operator |
1727 |
| -template~(\ref{over.literal}) but not both. If \term{S} contains a raw literal operator, |
1728 |
| -the literal \term{L} is treated as a call of the form |
| 1726 | +Otherwise, \textit{S} shall contain a raw literal operator or a literal operator |
| 1727 | +template~(\ref{over.literal}) but not both. If \textit{S} contains a raw literal operator, |
| 1728 | +the literal \textit{L} is treated as a call of the form |
1729 | 1729 |
|
1730 | 1730 | \begin{codeblock}
|
1731 |
| -operator "" @\term{X}@(@"\term{n}{"}@) |
| 1731 | +operator "" @\textit{X}@(@"\textit{n}{"}@) |
1732 | 1732 | \end{codeblock}
|
1733 | 1733 |
|
1734 |
| -Otherwise (\term{S} contains a literal operator template), \term{L} is treated as a call |
| 1734 | +Otherwise (\textit{S} contains a literal operator template), \textit{L} is treated as a call |
1735 | 1735 | of the form
|
1736 | 1736 |
|
1737 | 1737 |
|
1738 | 1738 | \begin{codeblock}
|
1739 |
| -operator "" @\term{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
| 1739 | +operator "" @\textit{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
1740 | 1740 | \end{codeblock}
|
1741 | 1741 |
|
1742 |
| -where \term{n} is the source character sequence $c_1c_2...c_k$. \begin{note} The sequence |
| 1742 | +where \textit{n} is the source character sequence $c_1c_2...c_k$. \begin{note} The sequence |
1743 | 1743 | $c_1c_2...c_k$ can only contain characters from the basic source character set.
|
1744 | 1744 | \end{note}
|
1745 | 1745 |
|
1746 | 1746 | \pnum
|
1747 |
| -If \term{L} is a \grammarterm{user-defined-floating-literal}, let \term{f} be the |
1748 |
| -literal without its \grammarterm{ud-suffix}. If \term{S} contains a literal operator |
1749 |
| -with parameter type \tcode{long double}, the literal \term{L} is treated as a call of |
| 1747 | +If \textit{L} is a \grammarterm{user-defined-floating-literal}, let \textit{f} be the |
| 1748 | +literal without its \grammarterm{ud-suffix}. If \textit{S} contains a literal operator |
| 1749 | +with parameter type \tcode{long double}, the literal \textit{L} is treated as a call of |
1750 | 1750 | the form
|
1751 | 1751 |
|
1752 | 1752 | \begin{codeblock}
|
1753 |
| -operator "" @\term{X}@(@\term{f}@L) |
| 1753 | +operator "" @\textit{X}@(@\textit{f}@L) |
1754 | 1754 | \end{codeblock}
|
1755 | 1755 |
|
1756 |
| -Otherwise, \term{S} shall contain a raw literal operator or a literal operator |
1757 |
| -template~(\ref{over.literal}) but not both. If \term{S} contains a raw literal operator, |
1758 |
| -the \term{literal} \term{L} is treated as a call of the form |
| 1756 | +Otherwise, \textit{S} shall contain a raw literal operator or a literal operator |
| 1757 | +template~(\ref{over.literal}) but not both. If \textit{S} contains a raw literal operator, |
| 1758 | +the \textit{literal} \textit{L} is treated as a call of the form |
1759 | 1759 |
|
1760 | 1760 | \begin{codeblock}
|
1761 |
| -operator "" @\term{X}@(@"\term{f}{"}@) |
| 1761 | +operator "" @\textit{X}@(@"\textit{f}{"}@) |
1762 | 1762 | \end{codeblock}
|
1763 | 1763 |
|
1764 |
| -Otherwise (\term{S} contains a literal operator template), \term{L} is treated as a call |
| 1764 | +Otherwise (\textit{S} contains a literal operator template), \textit{L} is treated as a call |
1765 | 1765 | of the form
|
1766 | 1766 |
|
1767 | 1767 | \begin{codeblock}
|
1768 |
| -operator "" @\term{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
| 1768 | +operator "" @\textit{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
1769 | 1769 | \end{codeblock}
|
1770 | 1770 |
|
1771 |
| -where \term{f} is the source character sequence $c_1c_2...c_k$. \begin{note} The sequence |
| 1771 | +where \textit{f} is the source character sequence $c_1c_2...c_k$. \begin{note} The sequence |
1772 | 1772 | $c_1c_2...c_k$ can only contain characters from the basic source character set.
|
1773 | 1773 | \end{note}
|
1774 | 1774 |
|
1775 | 1775 | \pnum
|
1776 |
| -If \term{L} is a \grammarterm{user-defined-string-literal}, let \term{str} be the |
1777 |
| -literal without its \grammarterm{ud-suffix} and let \term{len} be |
| 1776 | +If \textit{L} is a \grammarterm{user-defined-string-literal}, let \textit{str} be the |
| 1777 | +literal without its \grammarterm{ud-suffix} and let \textit{len} be |
1778 | 1778 | the number of
|
1779 |
| -code units in \term{str} (i.e., its length excluding the terminating |
| 1779 | +code units in \textit{str} (i.e., its length excluding the terminating |
1780 | 1780 | null character).
|
1781 |
| - The literal \term{L} is treated as a call of the form |
| 1781 | + The literal \textit{L} is treated as a call of the form |
1782 | 1782 |
|
1783 | 1783 | \begin{codeblock}
|
1784 |
| -operator "" @\term{X}@(@\term{str}{}@, @\term{len}{}@) |
| 1784 | +operator "" @\textit{X}@(@\textit{str}{}@, @\textit{len}{}@) |
1785 | 1785 | \end{codeblock}
|
1786 | 1786 |
|
1787 | 1787 | \pnum
|
1788 |
| -If \term{L} is a \grammarterm{user-defined-character-literal}, let \term{ch} be the |
| 1788 | +If \textit{L} is a \grammarterm{user-defined-character-literal}, let \textit{ch} be the |
1789 | 1789 | literal without its \grammarterm{ud-suffix}.
|
1790 |
| -\term{S} shall contain a literal operator~(\ref{over.literal}) whose only parameter has |
1791 |
| -the type of \term{ch} and the |
1792 |
| -literal \term{L} is treated as a call |
| 1790 | +\textit{S} shall contain a literal operator~(\ref{over.literal}) whose only parameter has |
| 1791 | +the type of \textit{ch} and the |
| 1792 | +literal \textit{L} is treated as a call |
1793 | 1793 | of the form
|
1794 | 1794 |
|
1795 | 1795 | \begin{codeblock}
|
1796 |
| -operator "" @\term{X}@(@\term{ch}{}@) |
| 1796 | +operator "" @\textit{X}@(@\textit{ch}{}@) |
1797 | 1797 | \end{codeblock}
|
1798 | 1798 |
|
1799 | 1799 | \pnum
|
|
0 commit comments