|
566 | 566 | \item
|
567 | 567 | \indextext{literal!string!raw}%
|
568 | 568 | If the next character begins a sequence of characters that could be the prefix
|
569 |
| -and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing |
| 569 | +and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing |
570 | 570 | token shall be a raw string literal. Between the initial and final
|
571 | 571 | double quote characters of the raw string, any transformations performed in phase
|
572 | 572 | 2 (line splicing) are reverted; this reversion
|
573 | 573 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
574 | 574 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
575 | 575 | of characters that matches the raw-string pattern
|
576 | 576 | \begin{ncbnf}
|
577 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 577 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
578 | 578 | \end{ncbnf}
|
579 | 579 |
|
580 | 580 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
692 | 692 | \begin{bnf}
|
693 | 693 | \nontermdef{pp-number}\br
|
694 | 694 | digit\br
|
695 |
| - \terminal{.} digit\br |
| 695 | + \literalterminal{.} digit\br |
696 | 696 | pp-number identifier-continue\br
|
697 |
| - pp-number \terminal{'} digit\br |
698 |
| - pp-number \terminal{'} nondigit\br |
699 |
| - pp-number \terminal{e} sign\br |
700 |
| - pp-number \terminal{E} sign\br |
701 |
| - pp-number \terminal{p} sign\br |
702 |
| - pp-number \terminal{P} sign\br |
703 |
| - pp-number \terminal{.} |
| 697 | + pp-number \literalterminal{'} digit\br |
| 698 | + pp-number \literalterminal{'} nondigit\br |
| 699 | + pp-number \literalterminal{e} sign\br |
| 700 | + pp-number \literalterminal{E} sign\br |
| 701 | + pp-number \literalterminal{p} sign\br |
| 702 | + pp-number \literalterminal{P} sign\br |
| 703 | + pp-number \literalterminal{.} |
704 | 704 | \end{bnf}
|
705 | 705 |
|
706 | 706 | \pnum
|
|
1121 | 1121 | \nontermdef{binary-literal}\br
|
1122 | 1122 | \terminal{0b} binary-digit\br
|
1123 | 1123 | \terminal{0B} binary-digit\br
|
1124 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1124 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1125 | 1125 | \end{bnf}
|
1126 | 1126 |
|
1127 | 1127 | \begin{bnf}
|
1128 | 1128 | \nontermdef{octal-literal}\br
|
1129 | 1129 | \terminal{0}\br
|
1130 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1130 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1131 | 1131 | \end{bnf}
|
1132 | 1132 |
|
1133 | 1133 | \begin{bnf}
|
1134 | 1134 | \nontermdef{decimal-literal}\br
|
1135 | 1135 | nonzero-digit\br
|
1136 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1136 | + decimal-literal \opt{\literalterminal{'}} digit |
1137 | 1137 | \end{bnf}
|
1138 | 1138 |
|
1139 | 1139 | \begin{bnf}
|
|
1164 | 1164 | \begin{bnf}
|
1165 | 1165 | \nontermdef{hexadecimal-digit-sequence}\br
|
1166 | 1166 | hexadecimal-digit\br
|
1167 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1167 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1168 | 1168 | \end{bnf}
|
1169 | 1169 |
|
1170 | 1170 | \begin{bnf}
|
1171 | 1171 | \nontermdef{hexadecimal-digit} \textnormal{one of}\br
|
1172 |
| - \terminal{0 1 2 3 4 5 6 7 8 9}\br |
1173 |
| - \terminal{a b c d e f}\br |
1174 |
| - \terminal{A B C D E F} |
| 1172 | + \literalterminal{0 1 2 3 4 5 6 7 8 9}\br |
| 1173 | + \literalterminal{a b c d e f}\br |
| 1174 | + \literalterminal{A B C D E F} |
1175 | 1175 | \end{bnf}
|
1176 | 1176 |
|
1177 | 1177 | \begin{bnf}
|
|
1186 | 1186 |
|
1187 | 1187 | \begin{bnf}
|
1188 | 1188 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1189 |
| - \terminal{u U} |
| 1189 | + \literalterminal{u U} |
1190 | 1190 | \end{bnf}
|
1191 | 1191 |
|
1192 | 1192 | \begin{bnf}
|
1193 | 1193 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1194 |
| - \terminal{l L} |
| 1194 | + \literalterminal{l L} |
1195 | 1195 | \end{bnf}
|
1196 | 1196 |
|
1197 | 1197 | \begin{bnf}
|
1198 | 1198 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1199 |
| - \terminal{ll LL} |
| 1199 | + \literalterminal{ll LL} |
1200 | 1200 | \end{bnf}
|
1201 | 1201 |
|
1202 | 1202 | \begin{bnf}
|
|
1235 | 1235 |
|
1236 | 1236 | \pnum
|
1237 | 1237 | The \grammarterm{hexadecimal-digit}s
|
1238 |
| -\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} |
| 1238 | +\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F} |
1239 | 1239 | have decimal values ten through fifteen.
|
1240 | 1240 | \begin{example}
|
1241 | 1241 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1279 | 1279 | &
|
1280 | 1280 | &
|
1281 | 1281 | \tcode{unsigned long long int}\\\hline
|
1282 |
| -\tcode{u} or \tcode{U} & |
| 1282 | +\literaltcode{u} or \literaltcode{U} & |
1283 | 1283 | \tcode{unsigned int} &
|
1284 | 1284 | \tcode{unsigned int}\\
|
1285 | 1285 | &
|
|
1288 | 1288 | &
|
1289 | 1289 | \tcode{unsigned long long int} &
|
1290 | 1290 | \tcode{unsigned long long int}\\\hline
|
1291 |
| -\tcode{l} or \tcode{L} & |
| 1291 | +\literaltcode{l} or \literaltcode{L} & |
1292 | 1292 | \tcode{long int} &
|
1293 | 1293 | \tcode{long int}\\
|
1294 | 1294 | &
|
|
1300 | 1300 | &
|
1301 | 1301 | &
|
1302 | 1302 | \tcode{unsigned long long int}\\\hline
|
1303 |
| -Both \tcode{u} or \tcode{U} & |
| 1303 | +Both \literaltcode{u} or \literaltcode{U} & |
1304 | 1304 | \tcode{unsigned long int} &
|
1305 | 1305 | \tcode{unsigned long int}\\
|
1306 |
| -and \tcode{l} or \tcode{L} & |
| 1306 | +and \literaltcode{l} or \literaltcode{L} & |
1307 | 1307 | \tcode{unsigned long long int} &
|
1308 | 1308 | \tcode{unsigned long long int}\\\hline
|
1309 |
| -\tcode{ll} or \tcode{LL} & |
| 1309 | +\literaltcode{ll} or \literaltcode{LL} & |
1310 | 1310 | \tcode{long long int} &
|
1311 | 1311 | \tcode{long long int}\\
|
1312 | 1312 | &
|
1313 | 1313 | &
|
1314 | 1314 | \tcode{unsigned long long int}\\\hline
|
1315 |
| -Both \tcode{u} or \tcode{U} & |
| 1315 | +Both \literaltcode{u} or \literaltcode{U} & |
1316 | 1316 | \tcode{unsigned long long int} &
|
1317 | 1317 | \tcode{unsigned long long int}\\
|
1318 |
| -and \tcode{ll} or \tcode{LL} & |
| 1318 | +and \literaltcode{ll} or \literaltcode{LL} & |
1319 | 1319 | &
|
1320 | 1320 | \\\hline
|
1321 | 1321 | \tcode{z} or \tcode{Z} &
|
|
1363 | 1363 | \indextext{literal!character}%
|
1364 | 1364 | \begin{bnf}
|
1365 | 1365 | \nontermdef{character-literal}\br
|
1366 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1366 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1367 | 1367 | \end{bnf}
|
1368 | 1368 |
|
1369 | 1369 | \begin{bnf}
|
1370 | 1370 | \nontermdef{encoding-prefix} \textnormal{one of}\br
|
1371 |
| - \terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L} |
| 1371 | + \literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L} |
1372 | 1372 | \end{bnf}
|
1373 | 1373 |
|
1374 | 1374 | \begin{bnf}
|
|
1419 | 1419 |
|
1420 | 1420 | \begin{bnf}
|
1421 | 1421 | \nontermdef{octal-escape-sequence}\br
|
1422 |
| - \terminal{\textbackslash} octal-digit\br |
1423 |
| - \terminal{\textbackslash} octal-digit octal-digit\br |
1424 |
| - \terminal{\textbackslash} octal-digit octal-digit octal-digit\br |
1425 |
| - \terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}} |
| 1422 | + \literalterminal{\textbackslash} octal-digit\br |
| 1423 | + \literalterminal{\textbackslash} octal-digit octal-digit\br |
| 1424 | + \literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br |
| 1425 | + \literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}} |
1426 | 1426 | \end{bnf}
|
1427 | 1427 |
|
1428 | 1428 | \begin{bnf}
|
1429 | 1429 | \nontermdef{hexadecimal-escape-sequence}\br
|
1430 |
| - \terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
1431 |
| - \terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}} |
| 1430 | + \literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
| 1431 | + \literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}} |
1432 | 1432 | \end{bnf}
|
1433 | 1433 |
|
1434 | 1434 | \begin{bnf}
|
|
1616 | 1616 |
|
1617 | 1617 | \begin{bnf}
|
1618 | 1618 | \nontermdef{fractional-constant}\br
|
1619 |
| - \opt{digit-sequence} \terminal{.} digit-sequence\br |
1620 |
| - digit-sequence \terminal{.} |
| 1619 | + \opt{digit-sequence} \literalterminal{.} digit-sequence\br |
| 1620 | + digit-sequence \literalterminal{.} |
1621 | 1621 | \end{bnf}
|
1622 | 1622 |
|
1623 | 1623 | \begin{bnf}
|
1624 | 1624 | \nontermdef{hexadecimal-fractional-constant}\br
|
1625 |
| - \opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br |
1626 |
| - hexadecimal-digit-sequence \terminal{.} |
| 1625 | + \opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br |
| 1626 | + hexadecimal-digit-sequence \literalterminal{.} |
1627 | 1627 | \end{bnf}
|
1628 | 1628 |
|
1629 | 1629 | \begin{bnf}
|
1630 | 1630 | \nontermdef{exponent-part}\br
|
1631 |
| - \terminal{e} \opt{sign} digit-sequence\br |
1632 |
| - \terminal{E} \opt{sign} digit-sequence |
| 1631 | + \literalterminal{e} \opt{sign} digit-sequence\br |
| 1632 | + \literalterminal{E} \opt{sign} digit-sequence |
1633 | 1633 | \end{bnf}
|
1634 | 1634 |
|
1635 | 1635 | \begin{bnf}
|
1636 | 1636 | \nontermdef{binary-exponent-part}\br
|
1637 |
| - \terminal{p} \opt{sign} digit-sequence\br |
1638 |
| - \terminal{P} \opt{sign} digit-sequence |
| 1637 | + \literalterminal{p} \opt{sign} digit-sequence\br |
| 1638 | + \literalterminal{P} \opt{sign} digit-sequence |
1639 | 1639 | \end{bnf}
|
1640 | 1640 |
|
1641 | 1641 | \begin{bnf}
|
1642 | 1642 | \nontermdef{sign} \textnormal{one of}\br
|
1643 |
| - \terminal{+ -} |
| 1643 | + \literalterminal{+ -} |
1644 | 1644 | \end{bnf}
|
1645 | 1645 |
|
1646 | 1646 | \begin{bnf}
|
1647 | 1647 | \nontermdef{digit-sequence}\br
|
1648 | 1648 | digit\br
|
1649 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1649 | + digit-sequence \opt{\literalterminal{'}} digit |
1650 | 1650 | \end{bnf}
|
1651 | 1651 |
|
1652 | 1652 | \begin{bnf}
|
1653 | 1653 | \nontermdef{floating-point-suffix} \textnormal{one of}\br
|
1654 |
| - \terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
| 1654 | + \literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
1655 | 1655 | \end{bnf}
|
1656 | 1656 |
|
1657 | 1657 | \pnum
|
|
1679 | 1679 | \topline
|
1680 | 1680 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1681 | 1681 | none & \keyword{double} \\
|
1682 |
| -\tcode{f} or \tcode{F} & \keyword {float} \\ |
1683 |
| -\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\ |
1684 |
| -\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\ |
1685 |
| -\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\ |
1686 |
| -\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\ |
1687 |
| -\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\ |
1688 |
| -\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\ |
| 1682 | +\literaltcode{f} or \literaltcode{F} & \keyword {float} \\ |
| 1683 | +\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\ |
| 1684 | +\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\ |
| 1685 | +\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\ |
| 1686 | +\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\ |
| 1687 | +\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\ |
| 1688 | +\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\ |
1689 | 1689 | \end{simpletypetable}
|
1690 | 1690 |
|
1691 | 1691 | \pnum
|
|
1736 | 1736 | \indextext{literal!string}%
|
1737 | 1737 | \begin{bnf}
|
1738 | 1738 | \nontermdef{string-literal}\br
|
1739 |
| - \opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br |
1740 |
| - \opt{encoding-prefix} \terminal{R} raw-string |
| 1739 | + \opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br |
| 1740 | + \opt{encoding-prefix} \literalterminal{R} raw-string |
1741 | 1741 | \end{bnf}
|
1742 | 1742 |
|
1743 | 1743 | \begin{bnf}
|
|
1760 | 1760 |
|
1761 | 1761 | \begin{bnf}
|
1762 | 1762 | \nontermdef{raw-string}\br
|
1763 |
| - \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"} |
| 1763 | + \literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"} |
1764 | 1764 | \end{bnf}
|
1765 | 1765 |
|
1766 | 1766 | \begin{bnf}
|
|
1845 | 1845 |
|
1846 | 1846 | \pnum
|
1847 | 1847 | \indextext{literal!string!raw}%
|
1848 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1848 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1849 | 1849 | \indextext{prefix!\idxcode{R}}%
|
1850 | 1850 | in the prefix is a \defn{raw string literal}. The
|
1851 | 1851 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments