Doc fixes

This commit is contained in:
Peter Dimov
2017-08-04 00:56:32 +03:00
parent a62d652546
commit 10922a5aad
4 changed files with 19 additions and 4 deletions

View 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>

View File

@@ -10,6 +10,9 @@ http://www.boost.org/LICENSE_1_0.txt
# Simple {cpp}11 metaprogramming # Simple {cpp}11 metaprogramming
Peter Dimov Peter Dimov
2015-05-26 2015-05-26
:toc: left
:idprefix:
:docinfo: shared-footer
[.lead] [.lead]
__With variadic templates, parameter packs and template aliases__ __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 substantially different than its idomatic {cpp}03 equivalent. Boost.MPL is no
longer good enough, and __something must be done__. But what? 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: 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>; 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, 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 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, "" ); 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 What if we had a pair of tuples as input, and had to produce the corresponding
tuple of pairs? For example, given tuple of pairs? For example, given

View File

@@ -10,6 +10,9 @@ http://www.boost.org/LICENSE_1_0.txt
# Simple {cpp}11 metaprogramming, part 2 # Simple {cpp}11 metaprogramming, part 2
Peter Dimov Peter Dimov
2015-06-20 2015-06-20
:toc: left
:idprefix:
:docinfo: shared-footer
[.lead] [.lead]
__Efficient algorithms for membership testing, random access, and retrieval by __Efficient algorithms for membership testing, random access, and retrieval by

View File

@@ -29,7 +29,7 @@ include::mp11/reference.adoc[]
:leveloffset: -1 :leveloffset: -1
[appendix] [appendix]
## Copyright and License ## Copyright, License, and Acknowledgments
This documentation is This documentation is
@@ -37,3 +37,6 @@ This documentation is
* Copyright 2017 Bjørn Reese * Copyright 2017 Bjørn Reese
and is distributed under the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0]. 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.