tmp/tmplg54nhem/{from.md → to.md}
RENAMED
|
@@ -1,17 +1,32 @@
|
|
| 1 |
### Function specifiers <a id="dcl.fct.spec">[[dcl.fct.spec]]</a>
|
| 2 |
|
| 3 |
-
can be used only in function
|
| 4 |
|
| 5 |
``` bnf
|
| 6 |
function-specifier:
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
```
|
| 10 |
|
| 11 |
The `virtual` specifier shall be used only in the initial declaration of
|
| 12 |
a non-static class member function; see [[class.virtual]].
|
| 13 |
|
| 14 |
-
|
| 15 |
constructor or conversion function within its class definition; see
|
| 16 |
[[class.conv.ctor]] and [[class.conv.fct]].
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
### Function specifiers <a id="dcl.fct.spec">[[dcl.fct.spec]]</a>
|
| 2 |
|
| 3 |
+
A *function-specifier* can be used only in a function declaration.
|
| 4 |
|
| 5 |
``` bnf
|
| 6 |
function-specifier:
|
| 7 |
+
virtual
|
| 8 |
+
explicit-specifier
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
``` bnf
|
| 12 |
+
explicit-specifier:
|
| 13 |
+
explicit '(' constant-expression ')'
|
| 14 |
+
explicit
|
| 15 |
```
|
| 16 |
|
| 17 |
The `virtual` specifier shall be used only in the initial declaration of
|
| 18 |
a non-static class member function; see [[class.virtual]].
|
| 19 |
|
| 20 |
+
An *explicit-specifier* shall be used only in the declaration of a
|
| 21 |
constructor or conversion function within its class definition; see
|
| 22 |
[[class.conv.ctor]] and [[class.conv.fct]].
|
| 23 |
|
| 24 |
+
In an *explicit-specifier*, the *constant-expression*, if supplied,
|
| 25 |
+
shall be a contextually converted constant expression of type `bool`
|
| 26 |
+
[[expr.const]]. The *explicit-specifier* `explicit` without a
|
| 27 |
+
*constant-expression* is equivalent to the *explicit-specifier*
|
| 28 |
+
`explicit(true)`. If the constant expression evaluates to `true`, the
|
| 29 |
+
function is explicit. Otherwise, the function is not explicit. A `(`
|
| 30 |
+
token that follows `explicit` is parsed as part of the
|
| 31 |
+
*explicit-specifier*.
|
| 32 |
+
|