tmp/tmpovx12492/{from.md → to.md}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
## User-defined literals <a id="over.literal">[[over.literal]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
literal-operator-id:
|
| 5 |
-
operator
|
| 6 |
operator user-defined-string-literal
|
| 7 |
```
|
| 8 |
|
| 9 |
-
The *
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
*
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
[[usrlit.suffix]]. A declaration whose *literal-operator-id* uses such a
|
| 17 |
literal suffix identifier is ill-formed, no diagnostic required.
|
| 18 |
|
| 19 |
A declaration whose *declarator-id* is a *literal-operator-id* shall
|
| 20 |
declare a function or function template that belongs to a namespace (it
|
|
@@ -49,17 +49,17 @@ is ill-formed.
|
|
| 49 |
A *raw literal operator* is a literal operator with a single parameter
|
| 50 |
whose type is `const char*`.
|
| 51 |
|
| 52 |
A *numeric literal operator template* is a literal operator template
|
| 53 |
whose *template-parameter-list* has a single *template-parameter* that
|
| 54 |
-
is a
|
| 55 |
type `char`. A *string literal operator template* is a literal operator
|
| 56 |
-
template whose *template-parameter-list* comprises a single
|
| 57 |
-
*
|
| 58 |
-
operator template shall have an
|
| 59 |
-
shall declare either a numeric
|
| 60 |
-
literal operator template.
|
| 61 |
|
| 62 |
Literal operators and literal operator templates shall not have C
|
| 63 |
language linkage.
|
| 64 |
|
| 65 |
[*Note 1*: Literal operators and literal operator templates are usually
|
|
@@ -134,35 +134,37 @@ extern "C" void operator ""_m(long double); // error: C language linkage
|
|
| 134 |
[dcl.init]: dcl.md#dcl.init
|
| 135 |
[dcl.init.aggr]: dcl.md#dcl.init.aggr
|
| 136 |
[dcl.init.list]: dcl.md#dcl.init.list
|
| 137 |
[dcl.init.ref]: dcl.md#dcl.init.ref
|
| 138 |
[dcl.init.string]: dcl.md#dcl.init.string
|
|
|
|
| 139 |
[dcl.type.class.deduct]: dcl.md#dcl.type.class.deduct
|
| 140 |
[dcl.type.simple]: dcl.md#dcl.type.simple
|
| 141 |
[depr.lit]: future.md#depr.lit
|
| 142 |
[expr.arith.conv]: expr.md#expr.arith.conv
|
| 143 |
-
[expr.
|
| 144 |
[expr.await]: expr.md#expr.await
|
| 145 |
[expr.call]: expr.md#expr.call
|
| 146 |
[expr.cast]: expr.md#expr.cast
|
| 147 |
[expr.compound]: expr.md#expr.compound
|
| 148 |
[expr.cond]: expr.md#expr.cond
|
| 149 |
[expr.eq]: expr.md#expr.eq
|
| 150 |
[expr.mptr.oper]: expr.md#expr.mptr.oper
|
| 151 |
[expr.pre.incr]: expr.md#expr.pre.incr
|
| 152 |
[expr.prim.paren]: expr.md#expr.prim.paren
|
|
|
|
| 153 |
[expr.prim.this]: expr.md#expr.prim.this
|
| 154 |
[expr.rel]: expr.md#expr.rel
|
| 155 |
[expr.spaceship]: expr.md#expr.spaceship
|
| 156 |
[expr.static.cast]: expr.md#expr.static.cast
|
| 157 |
[expr.sub]: expr.md#expr.sub
|
| 158 |
[expr.type.conv]: expr.md#expr.type.conv
|
| 159 |
[expr.unary.op]: expr.md#expr.unary.op
|
| 160 |
[lex.ext]: lex.md#lex.ext
|
| 161 |
[namespace.udecl]: dcl.md#namespace.udecl
|
| 162 |
[over]: #over
|
| 163 |
-
[over.
|
| 164 |
[over.best.ics]: #over.best.ics
|
| 165 |
[over.best.ics.general]: #over.best.ics.general
|
| 166 |
[over.binary]: #over.binary
|
| 167 |
[over.binary.general]: #over.binary.general
|
| 168 |
[over.built]: #over.built
|
|
|
|
| 1 |
## User-defined literals <a id="over.literal">[[over.literal]]</a>
|
| 2 |
|
| 3 |
``` bnf
|
| 4 |
literal-operator-id:
|
| 5 |
+
operator unevaluated-string identifier
|
| 6 |
operator user-defined-string-literal
|
| 7 |
```
|
| 8 |
|
| 9 |
+
The *user-defined-string-literal* in a *literal-operator-id* shall have
|
| 10 |
+
no *encoding-prefix*. The *unevaluated-string* or
|
| 11 |
+
*user-defined-string-literal* shall be empty. The *ud-suffix* of the
|
| 12 |
+
*user-defined-string-literal* or the *identifier* in a
|
| 13 |
+
*literal-operator-id* is called a *literal suffix identifier*. The first
|
| 14 |
+
form of *literal-operator-id* is deprecated [[depr.lit]]. Some literal
|
| 15 |
+
suffix identifiers are reserved for future standardization; see
|
| 16 |
[[usrlit.suffix]]. A declaration whose *literal-operator-id* uses such a
|
| 17 |
literal suffix identifier is ill-formed, no diagnostic required.
|
| 18 |
|
| 19 |
A declaration whose *declarator-id* is a *literal-operator-id* shall
|
| 20 |
declare a function or function template that belongs to a namespace (it
|
|
|
|
| 49 |
A *raw literal operator* is a literal operator with a single parameter
|
| 50 |
whose type is `const char*`.
|
| 51 |
|
| 52 |
A *numeric literal operator template* is a literal operator template
|
| 53 |
whose *template-parameter-list* has a single *template-parameter* that
|
| 54 |
+
is a constant template parameter pack [[temp.variadic]] with element
|
| 55 |
type `char`. A *string literal operator template* is a literal operator
|
| 56 |
+
template whose *template-parameter-list* comprises a single
|
| 57 |
+
*parameter-declaration* that declares a constant template parameter of
|
| 58 |
+
class type. The declaration of a literal operator template shall have an
|
| 59 |
+
empty *parameter-declaration-clause* and shall declare either a numeric
|
| 60 |
+
literal operator template or a string literal operator template.
|
| 61 |
|
| 62 |
Literal operators and literal operator templates shall not have C
|
| 63 |
language linkage.
|
| 64 |
|
| 65 |
[*Note 1*: Literal operators and literal operator templates are usually
|
|
|
|
| 134 |
[dcl.init]: dcl.md#dcl.init
|
| 135 |
[dcl.init.aggr]: dcl.md#dcl.init.aggr
|
| 136 |
[dcl.init.list]: dcl.md#dcl.init.list
|
| 137 |
[dcl.init.ref]: dcl.md#dcl.init.ref
|
| 138 |
[dcl.init.string]: dcl.md#dcl.init.string
|
| 139 |
+
[dcl.type.auto.deduct]: dcl.md#dcl.type.auto.deduct
|
| 140 |
[dcl.type.class.deduct]: dcl.md#dcl.type.class.deduct
|
| 141 |
[dcl.type.simple]: dcl.md#dcl.type.simple
|
| 142 |
[depr.lit]: future.md#depr.lit
|
| 143 |
[expr.arith.conv]: expr.md#expr.arith.conv
|
| 144 |
+
[expr.assign]: expr.md#expr.assign
|
| 145 |
[expr.await]: expr.md#expr.await
|
| 146 |
[expr.call]: expr.md#expr.call
|
| 147 |
[expr.cast]: expr.md#expr.cast
|
| 148 |
[expr.compound]: expr.md#expr.compound
|
| 149 |
[expr.cond]: expr.md#expr.cond
|
| 150 |
[expr.eq]: expr.md#expr.eq
|
| 151 |
[expr.mptr.oper]: expr.md#expr.mptr.oper
|
| 152 |
[expr.pre.incr]: expr.md#expr.pre.incr
|
| 153 |
[expr.prim.paren]: expr.md#expr.prim.paren
|
| 154 |
+
[expr.prim.splice]: expr.md#expr.prim.splice
|
| 155 |
[expr.prim.this]: expr.md#expr.prim.this
|
| 156 |
[expr.rel]: expr.md#expr.rel
|
| 157 |
[expr.spaceship]: expr.md#expr.spaceship
|
| 158 |
[expr.static.cast]: expr.md#expr.static.cast
|
| 159 |
[expr.sub]: expr.md#expr.sub
|
| 160 |
[expr.type.conv]: expr.md#expr.type.conv
|
| 161 |
[expr.unary.op]: expr.md#expr.unary.op
|
| 162 |
[lex.ext]: lex.md#lex.ext
|
| 163 |
[namespace.udecl]: dcl.md#namespace.udecl
|
| 164 |
[over]: #over
|
| 165 |
+
[over.assign]: #over.assign
|
| 166 |
[over.best.ics]: #over.best.ics
|
| 167 |
[over.best.ics.general]: #over.best.ics.general
|
| 168 |
[over.binary]: #over.binary
|
| 169 |
[over.binary.general]: #over.binary.general
|
| 170 |
[over.built]: #over.built
|