|
327 | 327 |
|
328 | 328 | \begin{bnf}
|
329 | 329 | \nontermdef{named-universal-character}\br
|
330 |
| - \terminal{\textbackslash N\{} n-char-sequence \terminal{\}} |
| 330 | + \literalterminal{\textbackslash N\{} n-char-sequence \literalterminal{\}} |
331 | 331 | \end{bnf}
|
332 | 332 |
|
333 | 333 | \begin{bnf}
|
|
343 | 343 |
|
344 | 344 | \begin{bnf}
|
345 | 345 | \nontermdef{universal-character-name}\br
|
346 |
| - \terminal{\textbackslash u} hex-quad\br |
347 |
| - \terminal{\textbackslash U} hex-quad hex-quad\br |
348 |
| - \terminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \terminal{\}}\br |
| 346 | + \literalterminal{\textbackslash u} hex-quad\br |
| 347 | + \literalterminal{\textbackslash U} hex-quad hex-quad\br |
| 348 | + \literalterminal{\textbackslash u\{} simple-hexadecimal-digit-sequence \literalterminal{\}}\br |
349 | 349 | named-universal-character
|
350 | 350 | \end{bnf}
|
351 | 351 |
|
352 | 352 | \pnum
|
353 | 353 | A \grammarterm{universal-character-name}
|
354 |
| -of the form \tcode{\textbackslash u} \grammarterm{hex-quad}, |
355 |
| -\tcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or |
356 |
| -\tcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}} |
| 354 | +of the form \literaltcode{\textbackslash u} \grammarterm{hex-quad}, |
| 355 | +\literaltcode{\textbackslash U} \grammarterm{hex-quad} \grammarterm{hex-quad}, or |
| 356 | +\literaltcode{\textbackslash u\{\grammarterm{simple-hexadecimal-digit-sequence}\}} |
357 | 357 | designates the character in the translation character set
|
358 | 358 | whose Unicode scalar value is the hexadecimal number represented by
|
359 | 359 | the sequence of \grammarterm{hexadecimal-digit}s
|
|
514 | 514 | \item
|
515 | 515 | \indextext{literal!string!raw}%
|
516 | 516 | If the next character begins a sequence of characters that could be the prefix
|
517 |
| -and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing |
| 517 | +and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing |
518 | 518 | token shall be a raw string literal. Between the initial and final
|
519 | 519 | double quote characters of the raw string, any transformations performed in phase
|
520 | 520 | 2 (line splicing) are reverted; this reversion
|
521 | 521 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
522 | 522 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
523 | 523 | of characters that matches the raw-string pattern
|
524 | 524 | \begin{ncbnf}
|
525 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 525 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
526 | 526 | \end{ncbnf}
|
527 | 527 |
|
528 | 528 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
753 | 753 | \begin{bnf}
|
754 | 754 | \nontermdef{pp-number}\br
|
755 | 755 | digit\br
|
756 |
| - \terminal{.} digit\br |
| 756 | + \literalterminal{.} digit\br |
757 | 757 | pp-number identifier-continue\br
|
758 |
| - pp-number \terminal{'} digit\br |
759 |
| - pp-number \terminal{'} nondigit\br |
760 |
| - pp-number \terminal{e} sign\br |
761 |
| - pp-number \terminal{E} sign\br |
762 |
| - pp-number \terminal{p} sign\br |
763 |
| - pp-number \terminal{P} sign\br |
764 |
| - pp-number \terminal{.} |
| 758 | + pp-number \literalterminal{'} digit\br |
| 759 | + pp-number \literalterminal{'} nondigit\br |
| 760 | + pp-number \literalterminal{e} sign\br |
| 761 | + pp-number \literalterminal{E} sign\br |
| 762 | + pp-number \literalterminal{p} sign\br |
| 763 | + pp-number \literalterminal{P} sign\br |
| 764 | + pp-number \literalterminal{.} |
765 | 765 | \end{bnf}
|
766 | 766 |
|
767 | 767 | \pnum
|
|
1101 | 1101 | \nontermdef{binary-literal}\br
|
1102 | 1102 | \terminal{0b} binary-digit\br
|
1103 | 1103 | \terminal{0B} binary-digit\br
|
1104 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1104 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1105 | 1105 | \end{bnf}
|
1106 | 1106 |
|
1107 | 1107 | \begin{bnf}
|
1108 | 1108 | \nontermdef{octal-literal}\br
|
1109 | 1109 | \terminal{0}\br
|
1110 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1110 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1111 | 1111 | \end{bnf}
|
1112 | 1112 |
|
1113 | 1113 | \begin{bnf}
|
1114 | 1114 | \nontermdef{decimal-literal}\br
|
1115 | 1115 | nonzero-digit\br
|
1116 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1116 | + decimal-literal \opt{\literalterminal{'}} digit |
1117 | 1117 | \end{bnf}
|
1118 | 1118 |
|
1119 | 1119 | \begin{bnf}
|
|
1144 | 1144 | \begin{bnf}
|
1145 | 1145 | \nontermdef{hexadecimal-digit-sequence}\br
|
1146 | 1146 | hexadecimal-digit\br
|
1147 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1147 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1148 | 1148 | \end{bnf}
|
1149 | 1149 |
|
1150 | 1150 | \begin{bnf}
|
1151 | 1151 | \nontermdef{hexadecimal-digit} \textnormal{one of}\br
|
1152 |
| - \terminal{0 1 2 3 4 5 6 7 8 9}\br |
1153 |
| - \terminal{a b c d e f}\br |
1154 |
| - \terminal{A B C D E F} |
| 1152 | + \literalterminal{0 1 2 3 4 5 6 7 8 9}\br |
| 1153 | + \literalterminal{a b c d e f}\br |
| 1154 | + \literalterminal{A B C D E F} |
1155 | 1155 | \end{bnf}
|
1156 | 1156 |
|
1157 | 1157 | \begin{bnf}
|
|
1166 | 1166 |
|
1167 | 1167 | \begin{bnf}
|
1168 | 1168 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1169 |
| - \terminal{u U} |
| 1169 | + \literalterminal{u U} |
1170 | 1170 | \end{bnf}
|
1171 | 1171 |
|
1172 | 1172 | \begin{bnf}
|
1173 | 1173 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1174 |
| - \terminal{l L} |
| 1174 | + \literalterminal{l L} |
1175 | 1175 | \end{bnf}
|
1176 | 1176 |
|
1177 | 1177 | \begin{bnf}
|
1178 | 1178 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1179 |
| - \terminal{ll LL} |
| 1179 | + \literalterminal{ll LL} |
1180 | 1180 | \end{bnf}
|
1181 | 1181 |
|
1182 | 1182 | \begin{bnf}
|
|
1215 | 1215 |
|
1216 | 1216 | \pnum
|
1217 | 1217 | The \grammarterm{hexadecimal-digit}s
|
1218 |
| -\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} |
| 1218 | +\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F} |
1219 | 1219 | have decimal values ten through fifteen.
|
1220 | 1220 | \begin{example}
|
1221 | 1221 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1259 | 1259 | &
|
1260 | 1260 | &
|
1261 | 1261 | \tcode{unsigned long long int}\\\hline
|
1262 |
| -\tcode{u} or \tcode{U} & |
| 1262 | +\literaltcode{u} or \literaltcode{U} & |
1263 | 1263 | \tcode{unsigned int} &
|
1264 | 1264 | \tcode{unsigned int}\\
|
1265 | 1265 | &
|
|
1268 | 1268 | &
|
1269 | 1269 | \tcode{unsigned long long int} &
|
1270 | 1270 | \tcode{unsigned long long int}\\\hline
|
1271 |
| -\tcode{l} or \tcode{L} & |
| 1271 | +\literaltcode{l} or \literaltcode{L} & |
1272 | 1272 | \tcode{long int} &
|
1273 | 1273 | \tcode{long int}\\
|
1274 | 1274 | &
|
|
1280 | 1280 | &
|
1281 | 1281 | &
|
1282 | 1282 | \tcode{unsigned long long int}\\\hline
|
1283 |
| -Both \tcode{u} or \tcode{U} & |
| 1283 | +Both \literaltcode{u} or \literaltcode{U} & |
1284 | 1284 | \tcode{unsigned long int} &
|
1285 | 1285 | \tcode{unsigned long int}\\
|
1286 |
| -and \tcode{l} or \tcode{L} & |
| 1286 | +and \literaltcode{l} or \literaltcode{L} & |
1287 | 1287 | \tcode{unsigned long long int} &
|
1288 | 1288 | \tcode{unsigned long long int}\\\hline
|
1289 |
| -\tcode{ll} or \tcode{LL} & |
| 1289 | +\literaltcode{ll} or \literaltcode{LL} & |
1290 | 1290 | \tcode{long long int} &
|
1291 | 1291 | \tcode{long long int}\\
|
1292 | 1292 | &
|
1293 | 1293 | &
|
1294 | 1294 | \tcode{unsigned long long int}\\\hline
|
1295 |
| -Both \tcode{u} or \tcode{U} & |
| 1295 | +Both \literaltcode{u} or \literaltcode{U} & |
1296 | 1296 | \tcode{unsigned long long int} &
|
1297 | 1297 | \tcode{unsigned long long int}\\
|
1298 |
| -and \tcode{ll} or \tcode{LL} & |
| 1298 | +and \literaltcode{ll} or \literaltcode{LL} & |
1299 | 1299 | &
|
1300 | 1300 | \\\hline
|
1301 | 1301 | \tcode{z} or \tcode{Z} &
|
|
1337 | 1337 | \indextext{literal!character}%
|
1338 | 1338 | \begin{bnf}
|
1339 | 1339 | \nontermdef{character-literal}\br
|
1340 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1340 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1341 | 1341 | \end{bnf}
|
1342 | 1342 |
|
1343 | 1343 | \begin{bnf}
|
1344 | 1344 | \nontermdef{encoding-prefix} \textnormal{one of}\br
|
1345 |
| - \terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L} |
| 1345 | + \literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L} |
1346 | 1346 | \end{bnf}
|
1347 | 1347 |
|
1348 | 1348 | \begin{bnf}
|
|
1395 | 1395 |
|
1396 | 1396 | \begin{bnf}
|
1397 | 1397 | \nontermdef{octal-escape-sequence}\br
|
1398 |
| - \terminal{\textbackslash} octal-digit\br |
1399 |
| - \terminal{\textbackslash} octal-digit octal-digit\br |
1400 |
| - \terminal{\textbackslash} octal-digit octal-digit octal-digit\br |
1401 |
| - \terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br |
| 1398 | + \literalterminal{\textbackslash} octal-digit\br |
| 1399 | + \literalterminal{\textbackslash} octal-digit octal-digit\br |
| 1400 | + \literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br |
| 1401 | + \literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br |
1402 | 1402 | \end{bnf}
|
1403 | 1403 |
|
1404 | 1404 | \begin{bnf}
|
1405 | 1405 | \nontermdef{hexadecimal-escape-sequence}\br
|
1406 |
| - \terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
1407 |
| - \terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}} |
| 1406 | + \literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
| 1407 | + \literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}} |
1408 | 1408 | \end{bnf}
|
1409 | 1409 |
|
1410 | 1410 | \begin{bnf}
|
|
1621 | 1621 |
|
1622 | 1622 | \begin{bnf}
|
1623 | 1623 | \nontermdef{fractional-constant}\br
|
1624 |
| - \opt{digit-sequence} \terminal{.} digit-sequence\br |
1625 |
| - digit-sequence \terminal{.} |
| 1624 | + \opt{digit-sequence} \literalterminal{.} digit-sequence\br |
| 1625 | + digit-sequence \literalterminal{.} |
1626 | 1626 | \end{bnf}
|
1627 | 1627 |
|
1628 | 1628 | \begin{bnf}
|
1629 | 1629 | \nontermdef{hexadecimal-fractional-constant}\br
|
1630 |
| - \opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br |
1631 |
| - hexadecimal-digit-sequence \terminal{.} |
| 1630 | + \opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br |
| 1631 | + hexadecimal-digit-sequence \literalterminal{.} |
1632 | 1632 | \end{bnf}
|
1633 | 1633 |
|
1634 | 1634 | \begin{bnf}
|
1635 | 1635 | \nontermdef{exponent-part}\br
|
1636 |
| - \terminal{e} \opt{sign} digit-sequence\br |
1637 |
| - \terminal{E} \opt{sign} digit-sequence |
| 1636 | + \literalterminal{e} \opt{sign} digit-sequence\br |
| 1637 | + \literalterminal{E} \opt{sign} digit-sequence |
1638 | 1638 | \end{bnf}
|
1639 | 1639 |
|
1640 | 1640 | \begin{bnf}
|
1641 | 1641 | \nontermdef{binary-exponent-part}\br
|
1642 |
| - \terminal{p} \opt{sign} digit-sequence\br |
1643 |
| - \terminal{P} \opt{sign} digit-sequence |
| 1642 | + \literalterminal{p} \opt{sign} digit-sequence\br |
| 1643 | + \literalterminal{P} \opt{sign} digit-sequence |
1644 | 1644 | \end{bnf}
|
1645 | 1645 |
|
1646 | 1646 | \begin{bnf}
|
1647 | 1647 | \nontermdef{sign} \textnormal{one of}\br
|
1648 |
| - \terminal{+ -} |
| 1648 | + \literalterminal{+ -} |
1649 | 1649 | \end{bnf}
|
1650 | 1650 |
|
1651 | 1651 | \begin{bnf}
|
1652 | 1652 | \nontermdef{digit-sequence}\br
|
1653 | 1653 | digit\br
|
1654 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1654 | + digit-sequence \opt{\literalterminal{'}} digit |
1655 | 1655 | \end{bnf}
|
1656 | 1656 |
|
1657 | 1657 | \begin{bnf}
|
1658 | 1658 | \nontermdef{floating-point-suffix} \textnormal{one of}\br
|
1659 |
| - \terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
| 1659 | + \literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
1660 | 1660 | \end{bnf}
|
1661 | 1661 |
|
1662 | 1662 | \pnum
|
|
1684 | 1684 | \topline
|
1685 | 1685 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1686 | 1686 | none & \keyword{double} \\
|
1687 |
| -\tcode{f} or \tcode{F} & \keyword {float} \\ |
1688 |
| -\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\ |
1689 |
| -\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\ |
1690 |
| -\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\ |
1691 |
| -\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\ |
1692 |
| -\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\ |
1693 |
| -\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\ |
| 1687 | +\literaltcode{f} or \literaltcode{F} & \keyword {float} \\ |
| 1688 | +\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\ |
| 1689 | +\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\ |
| 1690 | +\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\ |
| 1691 | +\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\ |
| 1692 | +\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\ |
| 1693 | +\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\ |
1694 | 1694 | \end{simpletypetable}
|
1695 | 1695 |
|
1696 | 1696 | \pnum
|
|
1741 | 1741 | \indextext{literal!string}%
|
1742 | 1742 | \begin{bnf}
|
1743 | 1743 | \nontermdef{string-literal}\br
|
1744 |
| - \opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br |
1745 |
| - \opt{encoding-prefix} \terminal{R} raw-string |
| 1744 | + \opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br |
| 1745 | + \opt{encoding-prefix} \literalterminal{R} raw-string |
1746 | 1746 | \end{bnf}
|
1747 | 1747 |
|
1748 | 1748 | \begin{bnf}
|
|
1766 | 1766 |
|
1767 | 1767 | \begin{bnf}
|
1768 | 1768 | \nontermdef{raw-string}\br
|
1769 |
| - \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"} |
| 1769 | + \literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"} |
1770 | 1770 | \end{bnf}
|
1771 | 1771 |
|
1772 | 1772 | \begin{bnf}
|
|
1853 | 1853 |
|
1854 | 1854 | \pnum
|
1855 | 1855 | \indextext{literal!string!raw}%
|
1856 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1856 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1857 | 1857 | \indextext{prefix!\idxcode{R}}%
|
1858 | 1858 | in the prefix is a \defn{raw string literal}. The
|
1859 | 1859 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments