tmp/tmpcxo5kvu5/{from.md → to.md}
RENAMED
|
@@ -12,17 +12,23 @@ template specialization may result in the implicit instantiation of the
|
|
| 12 |
template argument if and only if the semantics of `X` require that the
|
| 13 |
argument is a complete type.
|
| 14 |
|
| 15 |
For the purpose of defining the templates in this subclause, a function
|
| 16 |
call expression `declval<T>()` for any type `T` is considered to be a
|
| 17 |
-
trivial
|
| 18 |
-
odr-use [[
|
| 19 |
corresponding definition notwithstanding the restrictions of
|
| 20 |
[[declval]].
|
| 21 |
|
| 22 |
-
|
| 23 |
-
`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
[*Example 1*:
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
is_const_v<const volatile int> // true
|
|
|
|
| 12 |
template argument if and only if the semantics of `X` require that the
|
| 13 |
argument is a complete type.
|
| 14 |
|
| 15 |
For the purpose of defining the templates in this subclause, a function
|
| 16 |
call expression `declval<T>()` for any type `T` is considered to be a
|
| 17 |
+
trivial [[term.trivial.type]], [[special]] function call that is not an
|
| 18 |
+
odr-use [[term.odr.use]] of `declval` in the context of the
|
| 19 |
corresponding definition notwithstanding the restrictions of
|
| 20 |
[[declval]].
|
| 21 |
|
| 22 |
+
For the purpose of defining the templates in this subclause, let
|
| 23 |
+
`VAL<T>` for some type `T` be an expression defined as follows:
|
| 24 |
+
|
| 25 |
+
- If `T` is a reference or function type, `VAL<T>` is an expression with
|
| 26 |
+
the same type and value category as `declval<T>()`.
|
| 27 |
+
- Otherwise, `VAL<T>` is a prvalue that initially has type `T`.
|
| 28 |
+
\[*Note 1*: If `T` is cv-qualified, the cv-qualification is subject to
|
| 29 |
+
adjustment [[expr.type]]. — *end note*]
|
| 30 |
|
| 31 |
[*Example 1*:
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
is_const_v<const volatile int> // true
|