From de026d832244d842a911589c947ca5ec8205ee8a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 8 Mar 2020 02:44:09 +0200 Subject: [PATCH] Document mp_compose --- doc/mp11/changelog.adoc | 3 ++- doc/mp11/utility.adoc | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/mp11/changelog.adoc b/doc/mp11/changelog.adoc index f3ed4ec..e64ae54 100644 --- a/doc/mp11/changelog.adoc +++ b/doc/mp11/changelog.adoc @@ -1,5 +1,5 @@ //// -Copyright 2019 Peter Dimov +Copyright 2019-2020 Peter Dimov Distributed under the Boost Software License, Version 1.0. @@ -15,6 +15,7 @@ http://www.boost.org/LICENSE_1_0.txt * Added `mp_unique_if` (contributed by Kris Jusiak) * Added `mp_flatten` * Added `mp_rotate_left`, `mp_rotate_right` (contributed by Duncan Barber) +* Added `mp_compose` ## Changes in 1.70.0 diff --git a/doc/mp11/utility.adoc b/doc/mp11/utility.adoc index 386baee..30af92b 100644 --- a/doc/mp11/utility.adoc +++ b/doc/mp11/utility.adoc @@ -1,5 +1,5 @@ //// -Copyright 2017, 2019 Peter Dimov +Copyright 2017-2020 Peter Dimov Distributed under the Boost Software License, Version 1.0. @@ -288,3 +288,17 @@ That is, it negates the result of `P`. template using mp_not_fn_q = mp_not_fn; As `mp_not_fn`, but takes a quoted metafunction. + +## mp_compose + + template class... F> struct mp_compose; + +`mp_compose` is a quoted metafunction that applies +`F1`, `F2`, ..., `Fn` to its argument, in sequence. That is, +`mp_compose::fn` is `Fn<...F2>...>`. + +## mp_compose_q + + template using mp_compose_q = mp_compose; + +As `mp_compose`, but takes quoted metafunctions.