From 3425d6bb0036740ab0639574a201802bb2c2a822 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 8 Dec 2019 05:22:04 +0200 Subject: [PATCH] Fix mp_eval_if_c example; add one for mp_eval_or --- doc/mp11/utility.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/mp11/utility.adoc b/doc/mp11/utility.adoc index fcd1a61..1221242 100644 --- a/doc/mp11/utility.adoc +++ b/doc/mp11/utility.adoc @@ -113,7 +113,7 @@ is to avoid evaluating `F` when the condition is `true` as it may not be v .Using mp_eval_if_c to select the first pack element, or void ``` template using first_or_void = - mp_eval_if_c>; + mp_eval_if_c>; ``` ## mp_eval_if @@ -175,6 +175,12 @@ Like `mp_valid`, but takes a quoted metafunction. `mp_eval_or` is an alias for `F` when this expression is valid, for `T` otherwise. +.Using mp_eval_or to select the first pack element, or void +``` +template using first_or_void = + mp_eval_or>; +``` + ## mp_eval_or_q template using mp_eval_or_q =