forked from boostorg/mp11
Doc fixes
This commit is contained in:
6
doc/article/docinfo-footer.html
Normal file
6
doc/article/docinfo-footer.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<style>
|
||||
|
||||
*:not(pre)>code { background: none; color: #600000; }
|
||||
/* table tr.even, table tr.alt, table tr:nth-of-type(even) { background: none; } */
|
||||
|
||||
</style>
|
@@ -10,6 +10,9 @@ http://www.boost.org/LICENSE_1_0.txt
|
||||
# Simple {cpp}11 metaprogramming
|
||||
Peter Dimov
|
||||
2015-05-26
|
||||
:toc: left
|
||||
:idprefix:
|
||||
:docinfo: shared-footer
|
||||
|
||||
[.lead]
|
||||
__With variadic templates, parameter packs and template aliases__
|
||||
@@ -93,7 +96,7 @@ These language improvements allow for {cpp}11 metaprogramming that is
|
||||
substantially different than its idomatic {cpp}03 equivalent. Boost.MPL is no
|
||||
longer good enough, and __something must be done__. But what?
|
||||
|
||||
## Type lists and `mp_rename`
|
||||
## Type lists and mp_rename
|
||||
|
||||
Let's start with the basics. Our basic data structure will be the type list:
|
||||
```
|
||||
@@ -291,7 +294,7 @@ readability.)
|
||||
template<template<class...> class F, class L> using mp_apply = mp_rename<L, F>;
|
||||
```
|
||||
|
||||
## `mp_transform`
|
||||
## mp_transform
|
||||
|
||||
Let's revisit the example I gave earlier - someone hands us `std::tuple<X, Y,
|
||||
Z>` and we need to compute `std::tuple<X*, Y*, Z*>`. We already have
|
||||
@@ -394,7 +397,7 @@ using result = mp_transform<add_pointer, input>;
|
||||
static_assert( std::is_same<result, expected>::value, "" );
|
||||
```
|
||||
|
||||
## `mp_transform`, part two
|
||||
## mp_transform, part two
|
||||
|
||||
What if we had a pair of tuples as input, and had to produce the corresponding
|
||||
tuple of pairs? For example, given
|
||||
|
@@ -10,6 +10,9 @@ http://www.boost.org/LICENSE_1_0.txt
|
||||
# Simple {cpp}11 metaprogramming, part 2
|
||||
Peter Dimov
|
||||
2015-06-20
|
||||
:toc: left
|
||||
:idprefix:
|
||||
:docinfo: shared-footer
|
||||
|
||||
[.lead]
|
||||
__Efficient algorithms for membership testing, random access, and retrieval by
|
||||
|
@@ -29,7 +29,7 @@ include::mp11/reference.adoc[]
|
||||
:leveloffset: -1
|
||||
|
||||
[appendix]
|
||||
## Copyright and License
|
||||
## Copyright, License, and Acknowledgments
|
||||
|
||||
This documentation is
|
||||
|
||||
@@ -37,3 +37,6 @@ This documentation is
|
||||
* Copyright 2017 Bjørn Reese
|
||||
|
||||
and is distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].
|
||||
|
||||
The "Simple {cpp}11 metaprogramming" articles have been graciously converted to Asciidoc format for incorporation
|
||||
into this documentation by Glen Fernandes.
|
||||
|
Reference in New Issue
Block a user