|
555 | 555 | \item
|
556 | 556 | \indextext{literal!string!raw}%
|
557 | 557 | If the next character begins a sequence of characters that could be the prefix
|
558 |
| -and initial double quote of a raw string literal, such as \tcode{R"}, the next preprocessing |
| 558 | +and initial double quote of a raw string literal, such as \literaltcode{R"}, the next preprocessing |
559 | 559 | token shall be a raw string literal. Between the initial and final
|
560 | 560 | double quote characters of the raw string, any transformations performed in phase
|
561 | 561 | 2 (line splicing) are reverted; this reversion
|
562 | 562 | shall apply before any \grammarterm{d-char}, \grammarterm{r-char}, or delimiting
|
563 | 563 | parenthesis is identified. The raw string literal is defined as the shortest sequence
|
564 | 564 | of characters that matches the raw-string pattern
|
565 | 565 | \begin{ncbnf}
|
566 |
| -\opt{encoding-prefix} \terminal{R} raw-string |
| 566 | +\opt{encoding-prefix} \literalterminal{R} raw-string |
567 | 567 | \end{ncbnf}
|
568 | 568 |
|
569 | 569 | \item Otherwise, if the next three characters are \tcode{<::} and the subsequent character
|
|
693 | 693 | \begin{bnf}
|
694 | 694 | \nontermdef{pp-number}\br
|
695 | 695 | digit\br
|
696 |
| - \terminal{.} digit\br |
| 696 | + \literalterminal{.} digit\br |
697 | 697 | pp-number identifier-continue\br
|
698 |
| - pp-number \terminal{'} digit\br |
699 |
| - pp-number \terminal{'} nondigit\br |
700 |
| - pp-number \terminal{e} sign\br |
701 |
| - pp-number \terminal{E} sign\br |
702 |
| - pp-number \terminal{p} sign\br |
703 |
| - pp-number \terminal{P} sign\br |
704 |
| - pp-number \terminal{.} |
| 698 | + pp-number \literalterminal{'} digit\br |
| 699 | + pp-number \literalterminal{'} nondigit\br |
| 700 | + pp-number \literalterminal{e} sign\br |
| 701 | + pp-number \literalterminal{E} sign\br |
| 702 | + pp-number \literalterminal{p} sign\br |
| 703 | + pp-number \literalterminal{P} sign\br |
| 704 | + pp-number \literalterminal{.} |
705 | 705 | \end{bnf}
|
706 | 706 |
|
707 | 707 | \pnum
|
|
1123 | 1123 | \nontermdef{binary-literal}\br
|
1124 | 1124 | \terminal{0b} binary-digit\br
|
1125 | 1125 | \terminal{0B} binary-digit\br
|
1126 |
| - binary-literal \opt{\terminal{'}} binary-digit |
| 1126 | + binary-literal \opt{\literalterminal{'}} binary-digit |
1127 | 1127 | \end{bnf}
|
1128 | 1128 |
|
1129 | 1129 | \begin{bnf}
|
1130 | 1130 | \nontermdef{octal-literal}\br
|
1131 | 1131 | \terminal{0}\br
|
1132 |
| - octal-literal \opt{\terminal{'}} octal-digit |
| 1132 | + octal-literal \opt{\literalterminal{'}} octal-digit |
1133 | 1133 | \end{bnf}
|
1134 | 1134 |
|
1135 | 1135 | \begin{bnf}
|
1136 | 1136 | \nontermdef{decimal-literal}\br
|
1137 | 1137 | nonzero-digit\br
|
1138 |
| - decimal-literal \opt{\terminal{'}} digit |
| 1138 | + decimal-literal \opt{\literalterminal{'}} digit |
1139 | 1139 | \end{bnf}
|
1140 | 1140 |
|
1141 | 1141 | \begin{bnf}
|
|
1166 | 1166 | \begin{bnf}
|
1167 | 1167 | \nontermdef{hexadecimal-digit-sequence}\br
|
1168 | 1168 | hexadecimal-digit\br
|
1169 |
| - hexadecimal-digit-sequence \opt{\terminal{'}} hexadecimal-digit |
| 1169 | + hexadecimal-digit-sequence \opt{\literalterminal{'}} hexadecimal-digit |
1170 | 1170 | \end{bnf}
|
1171 | 1171 |
|
1172 | 1172 | \begin{bnf}
|
1173 | 1173 | \nontermdef{hexadecimal-digit} \textnormal{one of}\br
|
1174 |
| - \terminal{0 1 2 3 4 5 6 7 8 9}\br |
1175 |
| - \terminal{a b c d e f}\br |
1176 |
| - \terminal{A B C D E F} |
| 1174 | + \literalterminal{0 1 2 3 4 5 6 7 8 9}\br |
| 1175 | + \literalterminal{a b c d e f}\br |
| 1176 | + \literalterminal{A B C D E F} |
1177 | 1177 | \end{bnf}
|
1178 | 1178 |
|
1179 | 1179 | \begin{bnf}
|
|
1188 | 1188 |
|
1189 | 1189 | \begin{bnf}
|
1190 | 1190 | \nontermdef{unsigned-suffix} \textnormal{one of}\br
|
1191 |
| - \terminal{u U} |
| 1191 | + \literalterminal{u U} |
1192 | 1192 | \end{bnf}
|
1193 | 1193 |
|
1194 | 1194 | \begin{bnf}
|
1195 | 1195 | \nontermdef{long-suffix} \textnormal{one of}\br
|
1196 |
| - \terminal{l L} |
| 1196 | + \literalterminal{l L} |
1197 | 1197 | \end{bnf}
|
1198 | 1198 |
|
1199 | 1199 | \begin{bnf}
|
1200 | 1200 | \nontermdef{long-long-suffix} \textnormal{one of}\br
|
1201 |
| - \terminal{ll LL} |
| 1201 | + \literalterminal{ll LL} |
1202 | 1202 | \end{bnf}
|
1203 | 1203 |
|
1204 | 1204 | \begin{bnf}
|
|
1237 | 1237 |
|
1238 | 1238 | \pnum
|
1239 | 1239 | The \grammarterm{hexadecimal-digit}s
|
1240 |
| -\tcode{a} through \tcode{f} and \tcode{A} through \tcode{F} |
| 1240 | +\literaltcode{a} through \literaltcode{f} and \literaltcode{A} through \literaltcode{F} |
1241 | 1241 | have decimal values ten through fifteen.
|
1242 | 1242 | \begin{example}
|
1243 | 1243 | The number twelve can be written \tcode{12}, \tcode{014},
|
|
1281 | 1281 | &
|
1282 | 1282 | &
|
1283 | 1283 | \tcode{unsigned long long int}\\\hline
|
1284 |
| -\tcode{u} or \tcode{U} & |
| 1284 | +\literaltcode{u} or \literaltcode{U} & |
1285 | 1285 | \tcode{unsigned int} &
|
1286 | 1286 | \tcode{unsigned int}\\
|
1287 | 1287 | &
|
|
1290 | 1290 | &
|
1291 | 1291 | \tcode{unsigned long long int} &
|
1292 | 1292 | \tcode{unsigned long long int}\\\hline
|
1293 |
| -\tcode{l} or \tcode{L} & |
| 1293 | +\literaltcode{l} or \literaltcode{L} & |
1294 | 1294 | \tcode{long int} &
|
1295 | 1295 | \tcode{long int}\\
|
1296 | 1296 | &
|
|
1302 | 1302 | &
|
1303 | 1303 | &
|
1304 | 1304 | \tcode{unsigned long long int}\\\hline
|
1305 |
| -Both \tcode{u} or \tcode{U} & |
| 1305 | +Both \literaltcode{u} or \literaltcode{U} & |
1306 | 1306 | \tcode{unsigned long int} &
|
1307 | 1307 | \tcode{unsigned long int}\\
|
1308 |
| -and \tcode{l} or \tcode{L} & |
| 1308 | +and \literaltcode{l} or \literaltcode{L} & |
1309 | 1309 | \tcode{unsigned long long int} &
|
1310 | 1310 | \tcode{unsigned long long int}\\\hline
|
1311 |
| -\tcode{ll} or \tcode{LL} & |
| 1311 | +\literaltcode{ll} or \literaltcode{LL} & |
1312 | 1312 | \tcode{long long int} &
|
1313 | 1313 | \tcode{long long int}\\
|
1314 | 1314 | &
|
1315 | 1315 | &
|
1316 | 1316 | \tcode{unsigned long long int}\\\hline
|
1317 |
| -Both \tcode{u} or \tcode{U} & |
| 1317 | +Both \literaltcode{u} or \literaltcode{U} & |
1318 | 1318 | \tcode{unsigned long long int} &
|
1319 | 1319 | \tcode{unsigned long long int}\\
|
1320 |
| -and \tcode{ll} or \tcode{LL} & |
| 1320 | +and \literaltcode{ll} or \literaltcode{LL} & |
1321 | 1321 | &
|
1322 | 1322 | \\\hline
|
1323 | 1323 | \tcode{z} or \tcode{Z} &
|
|
1365 | 1365 | \indextext{literal!character}%
|
1366 | 1366 | \begin{bnf}
|
1367 | 1367 | \nontermdef{character-literal}\br
|
1368 |
| - \opt{encoding-prefix} \terminal{'} c-char-sequence \terminal{'} |
| 1368 | + \opt{encoding-prefix} \literalterminal{'} c-char-sequence \literalterminal{'} |
1369 | 1369 | \end{bnf}
|
1370 | 1370 |
|
1371 | 1371 | \begin{bnf}
|
1372 | 1372 | \nontermdef{encoding-prefix} \textnormal{one of}\br
|
1373 |
| - \terminal{u8}\quad\terminal{u}\quad\terminal{U}\quad\terminal{L} |
| 1373 | + \literalterminal{u8}\quad\literalterminal{u}\quad\literalterminal{U}\quad\literalterminal{L} |
1374 | 1374 | \end{bnf}
|
1375 | 1375 |
|
1376 | 1376 | \begin{bnf}
|
|
1423 | 1423 |
|
1424 | 1424 | \begin{bnf}
|
1425 | 1425 | \nontermdef{octal-escape-sequence}\br
|
1426 |
| - \terminal{\textbackslash} octal-digit\br |
1427 |
| - \terminal{\textbackslash} octal-digit octal-digit\br |
1428 |
| - \terminal{\textbackslash} octal-digit octal-digit octal-digit\br |
1429 |
| - \terminal{\textbackslash o\{} simple-octal-digit-sequence \terminal{\}}\br |
| 1426 | + \literalterminal{\textbackslash} octal-digit\br |
| 1427 | + \literalterminal{\textbackslash} octal-digit octal-digit\br |
| 1428 | + \literalterminal{\textbackslash} octal-digit octal-digit octal-digit\br |
| 1429 | + \literalterminal{\textbackslash o\{} simple-octal-digit-sequence \literalterminal{\}}\br |
1430 | 1430 | \end{bnf}
|
1431 | 1431 |
|
1432 | 1432 | \begin{bnf}
|
1433 | 1433 | \nontermdef{hexadecimal-escape-sequence}\br
|
1434 |
| - \terminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
1435 |
| - \terminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \terminal{\}} |
| 1434 | + \literalterminal{\textbackslash x} simple-hexadecimal-digit-sequence\br |
| 1435 | + \literalterminal{\textbackslash x\{} simple-hexadecimal-digit-sequence \literalterminal{\}} |
1436 | 1436 | \end{bnf}
|
1437 | 1437 |
|
1438 | 1438 | \begin{bnf}
|
|
1620 | 1620 |
|
1621 | 1621 | \begin{bnf}
|
1622 | 1622 | \nontermdef{fractional-constant}\br
|
1623 |
| - \opt{digit-sequence} \terminal{.} digit-sequence\br |
1624 |
| - digit-sequence \terminal{.} |
| 1623 | + \opt{digit-sequence} \literalterminal{.} digit-sequence\br |
| 1624 | + digit-sequence \literalterminal{.} |
1625 | 1625 | \end{bnf}
|
1626 | 1626 |
|
1627 | 1627 | \begin{bnf}
|
1628 | 1628 | \nontermdef{hexadecimal-fractional-constant}\br
|
1629 |
| - \opt{hexadecimal-digit-sequence} \terminal{.} hexadecimal-digit-sequence\br |
1630 |
| - hexadecimal-digit-sequence \terminal{.} |
| 1629 | + \opt{hexadecimal-digit-sequence} \literalterminal{.} hexadecimal-digit-sequence\br |
| 1630 | + hexadecimal-digit-sequence \literalterminal{.} |
1631 | 1631 | \end{bnf}
|
1632 | 1632 |
|
1633 | 1633 | \begin{bnf}
|
1634 | 1634 | \nontermdef{exponent-part}\br
|
1635 |
| - \terminal{e} \opt{sign} digit-sequence\br |
1636 |
| - \terminal{E} \opt{sign} digit-sequence |
| 1635 | + \literalterminal{e} \opt{sign} digit-sequence\br |
| 1636 | + \literalterminal{E} \opt{sign} digit-sequence |
1637 | 1637 | \end{bnf}
|
1638 | 1638 |
|
1639 | 1639 | \begin{bnf}
|
1640 | 1640 | \nontermdef{binary-exponent-part}\br
|
1641 |
| - \terminal{p} \opt{sign} digit-sequence\br |
1642 |
| - \terminal{P} \opt{sign} digit-sequence |
| 1641 | + \literalterminal{p} \opt{sign} digit-sequence\br |
| 1642 | + \literalterminal{P} \opt{sign} digit-sequence |
1643 | 1643 | \end{bnf}
|
1644 | 1644 |
|
1645 | 1645 | \begin{bnf}
|
1646 | 1646 | \nontermdef{sign} \textnormal{one of}\br
|
1647 |
| - \terminal{+ -} |
| 1647 | + \literalterminal{+ -} |
1648 | 1648 | \end{bnf}
|
1649 | 1649 |
|
1650 | 1650 | \begin{bnf}
|
1651 | 1651 | \nontermdef{digit-sequence}\br
|
1652 | 1652 | digit\br
|
1653 |
| - digit-sequence \opt{\terminal{'}} digit |
| 1653 | + digit-sequence \opt{\literalterminal{'}} digit |
1654 | 1654 | \end{bnf}
|
1655 | 1655 |
|
1656 | 1656 | \begin{bnf}
|
1657 | 1657 | \nontermdef{floating-point-suffix} \textnormal{one of}\br
|
1658 |
| - \terminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
| 1658 | + \literalterminal{f l f16 f32 f64 f128 bf16 F L F16 F32 F64 F128 BF16} |
1659 | 1659 | \end{bnf}
|
1660 | 1660 |
|
1661 | 1661 | \pnum
|
|
1683 | 1683 | \topline
|
1684 | 1684 | \lhdr{\grammarterm{floating-point-suffix}} & \rhdr{type} \\ \capsep
|
1685 | 1685 | none & \keyword{double} \\
|
1686 |
| -\tcode{f} or \tcode{F} & \keyword {float} \\ |
1687 |
| -\tcode{l} or \tcode{L} & \keyword{long} \keyword{double} \\ |
1688 |
| -\tcode{f16} or \tcode{F16} & \tcode{std::float16_t} \\ |
1689 |
| -\tcode{f32} or \tcode{F32} & \tcode{std::float32_t} \\ |
1690 |
| -\tcode{f64} or \tcode{F64} & \tcode{std::float64_t} \\ |
1691 |
| -\tcode{f128} or \tcode{F128} & \tcode{std::float128_t} \\ |
1692 |
| -\tcode{bf16} or \tcode{BF16} & \tcode{std::bfloat16_t} \\ |
| 1686 | +\literaltcode{f} or \literaltcode{F} & \keyword {float} \\ |
| 1687 | +\literaltcode{l} or \literaltcode{L} & \keyword{long} \keyword{double} \\ |
| 1688 | +\literaltcode{f16} or \literaltcode{F16} & \literaltcode{std::float16_t} \\ |
| 1689 | +\literaltcode{f32} or \literaltcode{F32} & \literaltcode{std::float32_t} \\ |
| 1690 | +\literaltcode{f64} or \literaltcode{F64} & \literaltcode{std::float64_t} \\ |
| 1691 | +\literaltcode{f128} or \literaltcode{F128} & \literaltcode{std::float128_t} \\ |
| 1692 | +\literaltcode{bf16} or \literaltcode{BF16} & \literaltcode{std::bfloat16_t} \\ |
1693 | 1693 | \end{simpletypetable}
|
1694 | 1694 |
|
1695 | 1695 | \pnum
|
|
1740 | 1740 | \indextext{literal!string}%
|
1741 | 1741 | \begin{bnf}
|
1742 | 1742 | \nontermdef{string-literal}\br
|
1743 |
| - \opt{encoding-prefix} \terminal{"} \opt{s-char-sequence} \terminal{"}\br |
1744 |
| - \opt{encoding-prefix} \terminal{R} raw-string |
| 1743 | + \opt{encoding-prefix} \literalterminal{"} \opt{s-char-sequence} \literalterminal{"}\br |
| 1744 | + \opt{encoding-prefix} \literalterminal{R} raw-string |
1745 | 1745 | \end{bnf}
|
1746 | 1746 |
|
1747 | 1747 | \begin{bnf}
|
|
1765 | 1765 |
|
1766 | 1766 | \begin{bnf}
|
1767 | 1767 | \nontermdef{raw-string}\br
|
1768 |
| - \terminal{"} \opt{d-char-sequence} \terminal{(} \opt{r-char-sequence} \terminal{)} \opt{d-char-sequence} \terminal{"} |
| 1768 | + \literalterminal{"} \opt{d-char-sequence} \literalterminal{(} \opt{r-char-sequence} \literalterminal{)} \opt{d-char-sequence} \literalterminal{"} |
1769 | 1769 | \end{bnf}
|
1770 | 1770 |
|
1771 | 1771 | \begin{bnf}
|
|
1852 | 1852 |
|
1853 | 1853 | \pnum
|
1854 | 1854 | \indextext{literal!string!raw}%
|
1855 |
| -A \grammarterm{string-literal} that has an \tcode{R} |
| 1855 | +A \grammarterm{string-literal} that has an \literaltcode{R} |
1856 | 1856 | \indextext{prefix!\idxcode{R}}%
|
1857 | 1857 | in the prefix is a \defn{raw string literal}. The
|
1858 | 1858 | \grammarterm{d-char-sequence} serves as a delimiter. The terminating
|
|
0 commit comments