Skip to content

Commit 8c99e5d

Browse files
committed
Add documentation
1 parent b5be78d commit 8c99e5d

9 files changed

+1314
-0
lines changed

doc/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/pdf/

doc/Jamfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2017, 2018 Peter Dimov
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# https://www.boost.org/LICENSE_1_0.txt
4+
5+
import asciidoctor ;
6+
7+
html lambda2.html : lambda2.adoc ;
8+
9+
install html_ : lambda2.html : <location>html ;
10+
11+
pdf lambda2.pdf : lambda2.adoc ;
12+
explicit lambda2.pdf ;
13+
14+
install pdf_ : lambda2.pdf : <location>pdf ;
15+
explicit pdf_ ;
16+
17+
###############################################################################
18+
alias boostdoc ;
19+
explicit boostdoc ;
20+
alias boostrelease : html_ ;
21+
explicit boostrelease ;

doc/html/lambda2.html

+990
Large diffs are not rendered by default.

doc/lambda2-docinfo-footer.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<style>
2+
3+
*:not(pre)>code { background: none; color: #600000; }
4+
:not(pre):not([class^=L])>code { background: none; color: #600000; }
5+
6+
</style>

doc/lambda2.adoc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
////
2+
Copyright 2020 Peter Dimov
3+
Distributed under the Boost Software License, Version 1.0.
4+
https://www.boost.org/LICENSE_1_0.txt
5+
////
6+
7+
# Lambda2: A {cpp}14 Lambda Library
8+
Peter Dimov
9+
:toc: left
10+
:toclevels: 4
11+
:idprefix:
12+
:docinfo: private-footer
13+
14+
:leveloffset: +1
15+
16+
include::lambda2/overview.adoc[]
17+
include::lambda2/reference.adoc[]
18+
include::lambda2/copyright.adoc[]
19+
20+
:leveloffset: -1

doc/lambda2/copyright.adoc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
////
2+
Copyright 2020 Peter Dimov
3+
Distributed under the Boost Software License, Version 1.0.
4+
https://www.boost.org/LICENSE_1_0.txt
5+
////
6+
7+
[#copyright]
8+
# Copyright and License
9+
:idprefix:
10+
11+
This documentation is copyright 2020 Peter Dimov and is distributed under
12+
the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].

doc/lambda2/overview.adoc

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
////
2+
Copyright 2020 Peter Dimov
3+
Distributed under the Boost Software License, Version 1.0.
4+
https://www.boost.org/LICENSE_1_0.txt
5+
////
6+
7+
[#overview]
8+
# Overview
9+
:idprefix: overview_
10+
11+
## Description
12+
13+
...
14+
15+
## Usage Examples
16+
17+
...
18+
19+
## Dependencies
20+
21+
None. A single, self-contained header.
22+
23+
## Supported Compilers
24+
25+
* GCC 5 or later with `-std=c++14` or above
26+
* Clang 3.5 or later with `-std=c++14` or above
27+
* Visual Studio 2015, 2017, 2019
28+
29+
Tested on https://travis-ci.org/github/pdimov/lambda2[Travis] and
30+
https://ci.appveyor.com/project/pdimov/lambda2[Appveyor].

doc/lambda2/reference.adoc

+219
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
////
2+
Copyright 2020 Peter Dimov
3+
Distributed under the Boost Software License, Version 1.0.
4+
https://www.boost.org/LICENSE_1_0.txt
5+
////
6+
7+
[#reference]
8+
# Reference
9+
:idprefix: ref_
10+
11+
## <boost/lambda2/lambda2.hpp>
12+
13+
### Synopsis
14+
15+
```
16+
namespace boost {
17+
namespace lambda2 {
18+
19+
template<class A, class B> auto operator+( A && a, B && b );
20+
template<class A, class B> auto operator-( A && a, B && b );
21+
template<class A, class B> auto operator*( A && a, B && b );
22+
template<class A, class B> auto operator/( A && a, B && b );
23+
template<class A, class B> auto operator%( A && a, B && b );
24+
template<class A> auto operator-( A && a );
25+
26+
template<class A, class B> auto operator==( A && a, B && b );
27+
template<class A, class B> auto operator!=( A && a, B && b );
28+
template<class A, class B> auto operator>( A && a, B && b );
29+
template<class A, class B> auto operator<( A && a, B && b );
30+
template<class A, class B> auto operator>=( A && a, B && b );
31+
template<class A, class B> auto operator<=( A && a, B && b );
32+
33+
template<class A, class B> auto operator&&( A && a, B && b );
34+
template<class A, class B> auto operator||( A && a, B && b );
35+
template<class A> auto operator!( A && a );
36+
37+
template<class A, class B> auto operator&( A && a, B && b );
38+
template<class A, class B> auto operator|( A && a, B && b );
39+
template<class A, class B> auto operator^( A && a, B && b );
40+
template<class A> auto operator~( A && a );
41+
42+
} // namespace lambda2
43+
} // namespace boost
44+
```
45+
46+
### Definitions
47+
48+
A type `T` is a _lambda expression_ if, for the type `T2` that is
49+
`std::remove_cv_t<std::remove_reference_t<T>>`, the expression
50+
`std::is_placeholder<T2>::value || std::is_bind_expression<T2>::value`
51+
is `true`.
52+
53+
All operators defined in the subsequent sections only participate in
54+
overload resolution if at least one of their operands is a _lambda
55+
expression_.
56+
57+
### Arithmetic Operators
58+
59+
```
60+
template<class A, class B> auto operator+( A && a, B && b );
61+
```
62+
[none]
63+
* {blank}
64+
+
65+
Returns: :: `std::bind( std::plus<>(), std::forward<A>(a), std::forward<B>(b) );`
66+
67+
```
68+
template<class A, class B> auto operator-( A && a, B && b );
69+
```
70+
[none]
71+
* {blank}
72+
+
73+
Returns: :: `std::bind( std::minus<>(), std::forward<A>(a), std::forward<B>(b) );`
74+
75+
```
76+
template<class A, class B> auto operator*( A && a, B && b );
77+
```
78+
[none]
79+
* {blank}
80+
+
81+
Returns: :: `std::bind( std::multiplies<>(), std::forward<A>(a), std::forward<B>(b) );`
82+
83+
```
84+
template<class A, class B> auto operator/( A && a, B && b );
85+
```
86+
[none]
87+
* {blank}
88+
+
89+
Returns: :: `std::bind( std::divides<>(), std::forward<A>(a), std::forward<B>(b) );`
90+
91+
```
92+
template<class A, class B> auto operator%( A && a, B && b );
93+
```
94+
[none]
95+
* {blank}
96+
+
97+
Returns: :: `std::bind( std::modulus<>(), std::forward<A>(a), std::forward<B>(b) );`
98+
99+
```
100+
template<class A> auto operator-( A && a );
101+
```
102+
[none]
103+
* {blank}
104+
+
105+
Returns: ::
106+
`std::bind( std::negate<>(), std::forward<A>(a) );`
107+
108+
### Relational Operators
109+
110+
```
111+
template<class A, class B> auto operator==( A && a, B && b );
112+
```
113+
[none]
114+
* {blank}
115+
+
116+
Returns: :: `std::bind( std::equal_to<>(), std::forward<A>(a), std::forward<B>(b) );`
117+
118+
```
119+
template<class A, class B> auto operator!=( A && a, B && b );
120+
```
121+
[none]
122+
* {blank}
123+
+
124+
Returns: :: `std::bind( std::not_equal_to<>(), std::forward<A>(a), std::forward<B>(b) );`
125+
126+
```
127+
template<class A, class B> auto operator>( A && a, B && b );
128+
```
129+
[none]
130+
* {blank}
131+
+
132+
Returns: :: `std::bind( std::greater<>(), std::forward<A>(a), std::forward<B>(b) );`
133+
134+
```
135+
template<class A, class B> auto operator<( A && a, B && b );
136+
```
137+
[none]
138+
* {blank}
139+
+
140+
Returns: :: `std::bind( std::less<>(), std::forward<A>(a), std::forward<B>(b) );`
141+
142+
```
143+
template<class A, class B> auto operator>=( A && a, B && b );
144+
```
145+
[none]
146+
* {blank}
147+
+
148+
Returns: :: `std::bind( std::greater_equal<>(), std::forward<A>(a), std::forward<B>(b) );`
149+
150+
```
151+
template<class A, class B> auto operator<=( A && a, B && b );
152+
```
153+
[none]
154+
* {blank}
155+
+
156+
Returns: ::
157+
`std::bind( std::less_equal<>(), std::forward<A>(a), std::forward<B>(b) );`
158+
159+
### Logical Operators
160+
161+
```
162+
template<class A, class B> auto operator&&( A && a, B && b );
163+
```
164+
[none]
165+
* {blank}
166+
+
167+
Returns: :: `std::bind( std::logical_and<>(), std::forward<A>(a), std::forward<B>(b) );`
168+
169+
```
170+
template<class A, class B> auto operator||( A && a, B && b );
171+
```
172+
[none]
173+
* {blank}
174+
+
175+
Returns: :: `std::bind( std::logical_or<>(), std::forward<A>(a), std::forward<B>(b) );`
176+
177+
```
178+
template<class A> auto operator!( A && a );
179+
```
180+
[none]
181+
* {blank}
182+
+
183+
Returns: ::
184+
`std::bind( std::logical_not<>(), std::forward<A>(a) );`
185+
186+
### Bitwise Operators
187+
188+
```
189+
template<class A, class B> auto operator&( A && a, B && b );
190+
```
191+
[none]
192+
* {blank}
193+
+
194+
Returns: :: `std::bind( std::bit_and<>(), std::forward<A>(a), std::forward<B>(b) );`
195+
196+
```
197+
template<class A, class B> auto operator|( A && a, B && b );
198+
```
199+
[none]
200+
* {blank}
201+
+
202+
Returns: :: `std::bind( std::bit_or<>(), std::forward<A>(a), std::forward<B>(b) );`
203+
204+
```
205+
template<class A, class B> auto operator^( A && a, B && b );
206+
```
207+
[none]
208+
* {blank}
209+
+
210+
Returns: :: `std::bind( std::bit_xor<>(), std::forward<A>(a), std::forward<B>(b) );`
211+
212+
```
213+
template<class A> auto operator~( A && a );
214+
```
215+
[none]
216+
* {blank}
217+
+
218+
Returns: ::
219+
`std::bind( std::bit_not<>(), std::forward<A>(a) );`

index.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="refresh" content="0; URL=doc/html/lambda2.html">
4+
</head>
5+
<body>
6+
Automatic redirection failed, please go to
7+
<a href="doc/html/lambda2.html">doc/html/lambda2.html</a>.
8+
</body>
9+
</html>
10+
<!--
11+
Copyright Beman Dawes, 2001
12+
Distributed under the Boost Software License, Version 1.0.
13+
See accompanying file LICENSE_1_0.txt or copy at
14+
http://www.boost.org/LICENSE_1_0.txt
15+
-->

0 commit comments

Comments
 (0)