tmp/tmpakpes6qj/{from.md → to.md}
RENAMED
|
@@ -2,32 +2,32 @@
|
|
| 2 |
|
| 3 |
The header `<type_traits>` has the following addition:
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
-
template
|
| 8 |
-
|
| 9 |
-
template <class T> constexpr bool is_literal_type_v = is_literal_type<T>::value;
|
| 10 |
-
|
| 11 |
-
template <class> struct result_of; // not defined
|
| 12 |
-
template <class Fn, class... ArgTypes> struct result_of<Fn(ArgTypes...)>;
|
| 13 |
-
|
| 14 |
-
template <class T> using result_of_t = typename result_of<T>::type;
|
| 15 |
}
|
| 16 |
```
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
cv `void`, or arrays of unknown bound.
|
| 22 |
|
| 23 |
-
`
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
`result_of<Fn(ArgTypes...)>` is a `TransformationTrait` whose member
|
| 27 |
-
typedef `type` is defined if and only if
|
| 28 |
-
`invoke_result<Fn, ArgTypes...>::type` is defined. If `type` is defined,
|
| 29 |
-
it names the same type as `invoke_result_t<Fn, ArgTypes...>`.
|
| 30 |
|
| 31 |
-
|
| 32 |
-
`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
|
|
|
| 2 |
|
| 3 |
The header `<type_traits>` has the following addition:
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
+
template<class T> struct is_pod;
|
| 8 |
+
template<class T> inline constexpr bool is_pod_v = is_pod<T>::value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
```
|
| 11 |
|
| 12 |
+
The behavior of a program that adds specializations for any of the
|
| 13 |
+
templates defined in this subclause is undefined, unless explicitly
|
| 14 |
+
permitted by the specification of the corresponding template.
|
|
|
|
| 15 |
|
| 16 |
+
``` cpp
|
| 17 |
+
template<class T> struct is_pod;
|
| 18 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
*Requires:* `remove_all_extents_t<T>` shall be a complete type or cv
|
| 21 |
+
`void`.
|
| 22 |
+
|
| 23 |
+
`is_pod<T>` is a *Cpp17UnaryTypeTrait*[[meta.rqmts]] with a base
|
| 24 |
+
characteristic of `true_type` if `T` is a POD type, and `false_type`
|
| 25 |
+
otherwise. A POD class is a class that is both a trivial class and a
|
| 26 |
+
standard-layout class, and has no non-static data members of type
|
| 27 |
+
non-POD class (or array thereof). A POD type is a scalar type, a POD
|
| 28 |
+
class, an array of such a type, or a cv-qualified version of one of
|
| 29 |
+
these types.
|
| 30 |
+
|
| 31 |
+
[*Note 1*: It is unspecified whether a closure
|
| 32 |
+
type [[expr.prim.lambda.closure]] is a POD type. — *end note*]
|
| 33 |
|