tmp/tmpbju0xmba/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Logical operator traits <a id="meta.logical">[[meta.logical]]</a>
|
| 2 |
+
|
| 3 |
+
This subclause describes type traits for applying logical operators to
|
| 4 |
+
other type traits.
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
template<class... B> struct conjunction : see below { };
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
The class template `conjunction` forms the logical conjunction of its
|
| 11 |
+
template type arguments.
|
| 12 |
+
|
| 13 |
+
For a specialization `conjunction<B1, ..., BN>`, if there is a template
|
| 14 |
+
type argument `Bi` for which `bool(Bi::value)` is `false`, then
|
| 15 |
+
instantiating `conjunction<B1, ..., BN>::value` does not require the
|
| 16 |
+
instantiation of `Bj::value` for `j > i`.
|
| 17 |
+
|
| 18 |
+
[*Note 1*: This is analogous to the short-circuiting behavior of the
|
| 19 |
+
built-in operator `&&`. — *end note*]
|
| 20 |
+
|
| 21 |
+
Every template type argument for which `Bi::value` is instantiated shall
|
| 22 |
+
be usable as a base class and shall have a member `value` which is
|
| 23 |
+
convertible to `bool`, is not hidden, and is unambiguously available in
|
| 24 |
+
the type.
|
| 25 |
+
|
| 26 |
+
The specialization `conjunction<B1, ..., BN>` has a public and
|
| 27 |
+
unambiguous base that is either
|
| 28 |
+
|
| 29 |
+
- the first type `Bi` in the list `true_type, B1, ..., BN` for which
|
| 30 |
+
`bool(Bi::value)` is `false`, or
|
| 31 |
+
- if there is no such `Bi`, the last type in the list.
|
| 32 |
+
|
| 33 |
+
[*Note 2*: This means a specialization of `conjunction` does not
|
| 34 |
+
necessarily inherit from either `true_type` or
|
| 35 |
+
`false_type`. — *end note*]
|
| 36 |
+
|
| 37 |
+
The member names of the base class, other than `conjunction` and
|
| 38 |
+
`operator=`, shall not be hidden and shall be unambiguously available in
|
| 39 |
+
`conjunction`.
|
| 40 |
+
|
| 41 |
+
``` cpp
|
| 42 |
+
template<class... B> struct disjunction : see below { };
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
The class template `disjunction` forms the logical disjunction of its
|
| 46 |
+
template type arguments.
|
| 47 |
+
|
| 48 |
+
For a specialization `disjunction<B1, ..., BN>`, if there is a template
|
| 49 |
+
type argument `Bi` for which `bool(Bi::value)` is `true`, then
|
| 50 |
+
instantiating `disjunction<B1, ..., BN>::value` does not require the
|
| 51 |
+
instantiation of `Bj::value` for `j > i`.
|
| 52 |
+
|
| 53 |
+
[*Note 3*: This is analogous to the short-circuiting behavior of the
|
| 54 |
+
built-in operator `||`. — *end note*]
|
| 55 |
+
|
| 56 |
+
Every template type argument for which `Bi::value` is instantiated shall
|
| 57 |
+
be usable as a base class and shall have a member `value` which is
|
| 58 |
+
convertible to `bool`, is not hidden, and is unambiguously available in
|
| 59 |
+
the type.
|
| 60 |
+
|
| 61 |
+
The specialization `disjunction<B1, ..., BN>` has a public and
|
| 62 |
+
unambiguous base that is either
|
| 63 |
+
|
| 64 |
+
- the first type `Bi` in the list `false_type, B1, ..., BN` for which
|
| 65 |
+
`bool(Bi::value)` is `true`, or
|
| 66 |
+
- if there is no such `Bi`, the last type in the list.
|
| 67 |
+
|
| 68 |
+
[*Note 4*: This means a specialization of `disjunction` does not
|
| 69 |
+
necessarily inherit from either `true_type` or
|
| 70 |
+
`false_type`. — *end note*]
|
| 71 |
+
|
| 72 |
+
The member names of the base class, other than `disjunction` and
|
| 73 |
+
`operator=`, shall not be hidden and shall be unambiguously available in
|
| 74 |
+
`disjunction`.
|
| 75 |
+
|
| 76 |
+
``` cpp
|
| 77 |
+
template<class B> struct negation : see below { };
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
The class template `negation` forms the logical negation of its template
|
| 81 |
+
type argument. The type `negation<B>` is a `UnaryTypeTrait` with a base
|
| 82 |
+
characteristic of `bool_constant<!bool(B::value)>`.
|
| 83 |
+
|