|
966 | 966 | \indextext{\idxcode{_}|see{character, underscore}}%
|
967 | 967 | \indextext{character!underscore!in identifier}%
|
968 | 968 | \indextext{reserved identifier}%
|
969 |
| -In addition, some identifiers are reserved for use by \Cpp{} |
| 969 | +In addition, some identifiers |
| 970 | +%FIXME: "appearing" isn't quite right here - reword? |
| 971 | +appearing as \grammarterm{token}{s} or \grammarterm{pp-tokens} |
| 972 | +are reserved for use by \Cpp{} |
970 | 973 | implementations and shall
|
971 | 974 | not be used otherwise; no diagnostic is required.
|
972 | 975 | \begin{itemize}
|
|
2256 | 2259 | parameter type \tcode{unsigned long long}, the literal \placeholder{L} is treated as a call of
|
2257 | 2260 | the form
|
2258 | 2261 | \begin{codeblock}
|
2259 |
| -operator "" @\placeholder{X}@(@\placeholder{n}@ULL) |
| 2262 | +operator ""@\placeholder{X}@(@\placeholder{n}@ULL) |
2260 | 2263 | \end{codeblock}
|
2261 | 2264 | Otherwise, \placeholder{S} shall contain a raw literal operator
|
2262 | 2265 | or a numeric literal operator template\iref{over.literal} but not both.
|
2263 | 2266 | If \placeholder{S} contains a raw literal operator,
|
2264 | 2267 | the literal \placeholder{L} is treated as a call of the form
|
2265 | 2268 | \begin{codeblock}
|
2266 |
| -operator "" @\placeholder{X}@("@\placeholder{n}@") |
| 2269 | +operator ""@\placeholder{X}@("@\placeholder{n}@") |
2267 | 2270 | \end{codeblock}
|
2268 | 2271 | Otherwise (\placeholder{S} contains a numeric literal operator template),
|
2269 | 2272 | \placeholder{L} is treated as a call of the form
|
2270 | 2273 | \begin{codeblock}
|
2271 |
| -operator "" @\placeholder{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
| 2274 | +operator ""@\placeholder{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
2272 | 2275 | \end{codeblock}
|
2273 | 2276 | where \placeholder{n} is the source character sequence $c_1c_2...c_k$.
|
2274 | 2277 | \begin{note}
|
|
2282 | 2285 | with parameter type \tcode{long double}, the literal \placeholder{L} is treated as a call of
|
2283 | 2286 | the form
|
2284 | 2287 | \begin{codeblock}
|
2285 |
| -operator "" @\placeholder{X}@(@\placeholder{f}@L) |
| 2288 | +operator ""@\placeholder{X}@(@\placeholder{f}@L) |
2286 | 2289 | \end{codeblock}
|
2287 | 2290 | Otherwise, \placeholder{S} shall contain a raw literal operator
|
2288 | 2291 | or a numeric literal operator template\iref{over.literal} but not both.
|
2289 | 2292 | If \placeholder{S} contains a raw literal operator,
|
2290 | 2293 | the \grammarterm{literal} \placeholder{L} is treated as a call of the form
|
2291 | 2294 | \begin{codeblock}
|
2292 |
| -operator "" @\placeholder{X}@("@\placeholder{f}@") |
| 2295 | +operator ""@\placeholder{X}@("@\placeholder{f}@") |
2293 | 2296 | \end{codeblock}
|
2294 | 2297 | Otherwise (\placeholder{S} contains a numeric literal operator template),
|
2295 | 2298 | \placeholder{L} is treated as a call of the form
|
2296 | 2299 | \begin{codeblock}
|
2297 |
| -operator "" @\placeholder{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
| 2300 | +operator ""@\placeholder{X}@<'@$c_1$@', '@$c_2$@', ... '@$c_k$@'>() |
2298 | 2301 | \end{codeblock}
|
2299 | 2302 | where \placeholder{f} is the source character sequence $c_1c_2...c_k$.
|
2300 | 2303 | \begin{note}
|
|
2312 | 2315 | a well-formed \grammarterm{template-argument},
|
2313 | 2316 | the literal \placeholder{L} is treated as a call of the form
|
2314 | 2317 | \begin{codeblock}
|
2315 |
| -operator "" @\placeholder{X}@<@\placeholder{str}{}@>() |
| 2318 | +operator ""@\placeholder{X}@<@\placeholder{str}{}@>() |
2316 | 2319 | \end{codeblock}
|
2317 | 2320 | Otherwise, the literal \placeholder{L} is treated as a call of the form
|
2318 | 2321 | \begin{codeblock}
|
2319 |
| -operator "" @\placeholder{X}@(@\placeholder{str}{}@, @\placeholder{len}{}@) |
| 2322 | +operator ""@\placeholder{X}@(@\placeholder{str}{}@, @\placeholder{len}{}@) |
2320 | 2323 | \end{codeblock}
|
2321 | 2324 |
|
2322 | 2325 | \pnum
|
|
2327 | 2330 | literal \placeholder{L} is treated as a call
|
2328 | 2331 | of the form
|
2329 | 2332 | \begin{codeblock}
|
2330 |
| -operator "" @\placeholder{X}@(@\placeholder{ch}{}@) |
| 2333 | +operator ""@\placeholder{X}@(@\placeholder{ch}{}@) |
2331 | 2334 | \end{codeblock}
|
2332 | 2335 |
|
2333 | 2336 | \pnum
|
2334 | 2337 | \begin{example}
|
2335 | 2338 | \begin{codeblock}
|
2336 |
| -long double operator "" _w(long double); |
2337 |
| -std::string operator "" _w(const char16_t*, std::size_t); |
2338 |
| -unsigned operator "" _w(const char*); |
| 2339 | +long double operator ""_w(long double); |
| 2340 | +std::string operator ""_w(const char16_t*, std::size_t); |
| 2341 | +unsigned operator ""_w(const char*); |
2339 | 2342 | int main() {
|
2340 |
| - 1.2_w; // calls \tcode{operator "" _w(1.2L)} |
2341 |
| - u"one"_w; // calls \tcode{operator "" _w(u"one", 3)} |
2342 |
| - 12_w; // calls \tcode{operator "" _w("12")} |
| 2343 | + 1.2_w; // calls \tcode{operator ""_w(1.2L)} |
| 2344 | + u"one"_w; // calls \tcode{operator ""_w(u"one", 3)} |
| 2345 | + 12_w; // calls \tcode{operator ""_w("12")} |
2343 | 2346 | "two"_w; // error: no applicable literal operator
|
2344 | 2347 | }
|
2345 | 2348 | \end{codeblock}
|
|
0 commit comments