mirror of
https://github.com/boostorg/lambda2.git
synced 2025-05-11 13:44:05 +00:00
Update overview
This commit is contained in:
parent
f3a3810be4
commit
a329989b1e
@ -1,5 +1,5 @@
|
||||
////
|
||||
Copyright 2020 Peter Dimov
|
||||
Copyright 2020, 2021 Peter Dimov
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
https://www.boost.org/LICENSE_1_0.txt
|
||||
////
|
||||
@ -12,16 +12,18 @@ https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
This is a simple, but functional, {cpp}14 lambda library. It takes
|
||||
advantage of the fact that the standard `<functional>` header already
|
||||
provides placeholders `_1`, `_2`, `_3`, and so on, for use with
|
||||
`std::bind`, and function objects such as `std::plus`, `std::greater`,
|
||||
`std::logical_not`, and `std::bit_xor`, corresponding to arithmetic,
|
||||
relational, logical and bitwise operators.
|
||||
provides `std::bind` customization points (`is_placeholder`,
|
||||
`is_bind_expression`), and function objects such as `std::plus`,
|
||||
`std::greater`, `std::logical_not`, and `std::bit_xor`, corresponding
|
||||
to arithmetic, relational, logical and bitwise operators.
|
||||
|
||||
This allows the library to provide a minimal implementation that
|
||||
still lets expressions such as `_1 + 5`, `_1 % 2 == 0`, `_1 > _2`,
|
||||
or `_1 == ' ' || _1 == '\t'` to be composed and used as function
|
||||
objects.
|
||||
|
||||
For example, `_1 + 5` is implemented as `std::bind(std::plus<>, _1, 5)`.
|
||||
|
||||
These "lambda" expressions can also be freely combined with `std::bind`.
|
||||
For example, `std::bind( f, _1 ) == std::bind( g, _1 )` and
|
||||
`std::bind( f, _1 + _2 )` both work and have the expected behavior.
|
||||
@ -67,5 +69,5 @@ None. A single, self-contained header.
|
||||
* Clang 3.5 or later with `-std=c++14` or above
|
||||
* Visual Studio 2015, 2017, 2019
|
||||
|
||||
Tested on https://travis-ci.org/github/pdimov/lambda2[Travis] and
|
||||
Tested on https://github.com/boostorg/lambda2/actions[Github Actions] and
|
||||
https://ci.appveyor.com/project/pdimov/lambda2[Appveyor].
|
||||
|
Loading…
x
Reference in New Issue
Block a user