From 8e1da779045e69c882a024d06a61a68e7272700c Mon Sep 17 00:00:00 2001
From: Peter Dimov
Date: Wed, 24 May 2017 05:58:06 +0300
Subject: [PATCH] Update documentation
---
doc/html/mp11.html | 21 ++++++++++-----------
doc/mp11/function.qbk | 9 +++++----
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/html/mp11.html b/doc/html/mp11.html
index eff6909..f35da32 100644
--- a/doc/html/mp11.html
+++ b/doc/html/mp11.html
@@ -2176,15 +2176,14 @@
mp_and<T...>
- is an alias for mp_false
- if there exists a type U
- in T...
- for which mp_to_bool<U>
- is not mp_true
. mp_to_bool<U>
- is not evaluated for types after U
.
- If no such type exists, mp_and<T...>
is an alias for mp_true
.
- (mp_and<>
- is mp_true
.)
+ applies mp_to_bool
to the
+ types in T...
,
+ in order. If the result of an application is mp_false
,
+ mp_and
returns mp_false
. If the application causes a
+ substitution failure, returns mp_false
.
+ If all results are mp_true
,
+ returns mp_true
. mp_and<>
+ is mp_true
.
using R1 = mp_and<mp_true, mp_true>;
using R2 = mp_and<mp_false, void>;
@@ -2209,7 +2208,7 @@
is an error because void
does
not have a nested value
.
The upside is that mp_all
- is faster on legacy compilers.
+ is potentially faster and does not mask substitution failures as mp_and
does.
using R1 = mp_and<mp_true, mp_true>;
using R2 = mp_and<mp_false, void>;
@@ -2493,7 +2492,7 @@
-Last revised: May 23, 2017 at 22:51:13 GMT |
+Last revised: May 24, 2017 at 02:43:53 GMT |
|
diff --git a/doc/mp11/function.qbk b/doc/mp11/function.qbk
index 52bab9a..ab1cb96 100644
--- a/doc/mp11/function.qbk
+++ b/doc/mp11/function.qbk
@@ -17,9 +17,9 @@ Same as `std::void_t` from C++17.
[section `mp_and`]
template using mp_and = /*...*/;
-`mp_and` is an alias for `mp_false` if there exists a type `U` in `T...` for which `mp_to_bool` is not `mp_true`.
-`mp_to_bool` is not evaluated for types after `U`. If no such type exists, `mp_and` is an alias for `mp_true`.
-(`mp_and<>` is `mp_true`.)
+`mp_and` applies `mp_to_bool` to the types in `T...`, in order. If the result of an application is `mp_false`, `mp_and`
+returns `mp_false`. If the application causes a substitution failure, returns `mp_false`. If all results are `mp_true`,
+returns `mp_true`. `mp_and<>` is `mp_true`.
using R1 = mp_and; // mp_true
using R2 = mp_and; // mp_false, void is not reached
@@ -32,7 +32,8 @@ Same as `std::void_t` from C++17.
`mp_all` is `mp_true` if `mp_to_bool` is `mp_true` for all types `U` in `T...`, `mp_false` otherwise. Same as
`mp_and`, but does not perform short-circuit evaluation. `mp_and` is `mp_false`, but `mp_all`
-is an error because `void` does not have a nested `value`. The upside is that `mp_all` is faster on legacy compilers.
+is an error because `void` does not have a nested `value`. The upside is that `mp_all` is potentially faster and does not
+mask substitution failures as `mp_and` does.
using R1 = mp_and; // mp_true
using R2 = mp_and; // compile-time error