tmp/tmpu7zhovkl/{from.md → to.md}
RENAMED
|
@@ -19,21 +19,34 @@ is_const<const int&>::value // false
|
|
| 19 |
is_const<int[3]>::value // false
|
| 20 |
is_const<const int[3]>::value // true
|
| 21 |
```
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
```
|
| 29 |
|
| 30 |
Given the following function prototype:
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
template <class T>
|
| 34 |
-
|
| 35 |
```
|
| 36 |
|
| 37 |
the predicate condition for a template specialization
|
| 38 |
`is_constructible<T, Args...>` shall be satisfied if and only if the
|
| 39 |
following variable definition would be well-formed for some invented
|
|
|
|
| 19 |
is_const<int[3]>::value // false
|
| 20 |
is_const<const int[3]>::value // true
|
| 21 |
```
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
+
remove_const_t<const volatile int> // volatile int
|
| 25 |
+
remove_const_t<const int* const> // const int*
|
| 26 |
+
remove_const_t<const int&> // const int&
|
| 27 |
+
remove_const_t<const int[3]> // int[3]
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
``` cpp
|
| 31 |
+
// Given:
|
| 32 |
+
struct P final { };
|
| 33 |
+
union U1 { };
|
| 34 |
+
union U2 final { };
|
| 35 |
+
|
| 36 |
+
// the following assertions hold:
|
| 37 |
+
static_assert(!is_final<int>::value, "Error!");
|
| 38 |
+
static_assert( is_final<P>::value, "Error!");
|
| 39 |
+
static_assert(!is_final<U1>::value, "Error!");
|
| 40 |
+
static_assert( is_final<U2>::value, "Error!");
|
| 41 |
```
|
| 42 |
|
| 43 |
Given the following function prototype:
|
| 44 |
|
| 45 |
``` cpp
|
| 46 |
template <class T>
|
| 47 |
+
add_rvalue_reference_t<T> create() noexcept;
|
| 48 |
```
|
| 49 |
|
| 50 |
the predicate condition for a template specialization
|
| 51 |
`is_constructible<T, Args...>` shall be satisfied if and only if the
|
| 52 |
following variable definition would be well-formed for some invented
|