diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..334f513 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +/pdf/ diff --git a/doc/Jamfile b/doc/Jamfile new file mode 100644 index 0000000..99f744a --- /dev/null +++ b/doc/Jamfile @@ -0,0 +1,21 @@ +# Copyright 2017, 2018 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +import asciidoctor ; + +html lambda2.html : lambda2.adoc ; + +install html_ : lambda2.html : html ; + +pdf lambda2.pdf : lambda2.adoc ; +explicit lambda2.pdf ; + +install pdf_ : lambda2.pdf : pdf ; +explicit pdf_ ; + +############################################################################### +alias boostdoc ; +explicit boostdoc ; +alias boostrelease : html_ ; +explicit boostrelease ; diff --git a/doc/html/lambda2.html b/doc/html/lambda2.html new file mode 100644 index 0000000..d63f5d4 --- /dev/null +++ b/doc/html/lambda2.html @@ -0,0 +1,990 @@ + + + + + + + + +Lambda2: A C++14 Lambda Library + + + + + +
+
+

Overview

+
+
+

Description

+
+

…​

+
+
+
+

Usage Examples

+
+

…​

+
+
+
+

Dependencies

+
+

None. A single, self-contained header.

+
+
+
+

Supported Compilers

+
+
    +
  • +

    GCC 5 or later with -std=c++14 or above

    +
  • +
  • +

    Clang 3.5 or later with -std=c++14 or above

    +
  • +
  • +

    Visual Studio 2015, 2017, 2019

    +
  • +
+
+
+

Tested on Travis and +Appveyor.

+
+
+
+
+
+

Reference

+
+
+

<boost/lambda2/lambda2.hpp>

+
+

Synopsis

+
+
+
namespace boost {
+namespace lambda2 {
+
+template<class A, class B> auto operator+( A && a, B && b );
+template<class A, class B> auto operator-( A && a, B && b );
+template<class A, class B> auto operator*( A && a, B && b );
+template<class A, class B> auto operator/( A && a, B && b );
+template<class A, class B> auto operator%( A && a, B && b );
+template<class A> auto operator-( A && a );
+
+template<class A, class B> auto operator==( A && a, B && b );
+template<class A, class B> auto operator!=( A && a, B && b );
+template<class A, class B> auto operator>( A && a, B && b );
+template<class A, class B> auto operator<( A && a, B && b );
+template<class A, class B> auto operator>=( A && a, B && b );
+template<class A, class B> auto operator<=( A && a, B && b );
+
+template<class A, class B> auto operator&&( A && a, B && b );
+template<class A, class B> auto operator||( A && a, B && b );
+template<class A> auto operator!( A && a );
+
+template<class A, class B> auto operator&( A && a, B && b );
+template<class A, class B> auto operator|( A && a, B && b );
+template<class A, class B> auto operator^( A && a, B && b );
+template<class A> auto operator~( A && a );
+
+} // namespace lambda2
+} // namespace boost
+
+
+
+
+

Definitions

+
+

A type T is a lambda expression if, for the type T2 that is +std::remove_cv_t<std::remove_reference_t<T>>, the expression +std::is_placeholder<T2>::value || std::is_bind_expression<T2>::value +is true.

+
+
+

All operators defined in the subsequent sections only participate in +overload resolution if at least one of their operands is a lambda +expression.

+
+
+
+

Arithmetic Operators

+
+
+
template<class A, class B> auto operator+( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::plus<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator-( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::minus<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator*( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::multiplies<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator/( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::divides<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator%( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::modulus<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A> auto operator-( A && a );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::negate<>(), std::forward<A>(a) );

    +
    +
    +
    +
  • +
+
+
+
+

Relational Operators

+
+
+
template<class A, class B> auto operator==( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::equal_to<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator!=( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::not_equal_to<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator>( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::greater<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator<( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::less<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator>=( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::greater_equal<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator<=( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::less_equal<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+

Logical Operators

+
+
+
template<class A, class B> auto operator&&( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::logical_and<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator||( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::logical_or<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A> auto operator!( A && a );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::logical_not<>(), std::forward<A>(a) );

    +
    +
    +
    +
  • +
+
+
+
+

Bitwise Operators

+
+
+
template<class A, class B> auto operator&( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::bit_and<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator|( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::bit_or<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A, class B> auto operator^( A && a, B && b );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::bit_xor<>(), std::forward<A>(a), std::forward<B>(b) );

    +
    +
    +
    +
  • +
+
+
+
+
template<class A> auto operator~( A && a );
+
+
+
+
    +
  • +

    +
    +
    +
    Returns:
    +
    +

    std::bind( std::bit_not<>(), std::forward<A>(a) );

    +
    +
    +
    +
  • +
+
+
+
+
+
+
+ +
+
+

This documentation is copyright 2020 Peter Dimov and is distributed under +the Boost Software License, Version 1.0.

+
+
+
+
+ + + + \ No newline at end of file diff --git a/doc/lambda2-docinfo-footer.html b/doc/lambda2-docinfo-footer.html new file mode 100644 index 0000000..d0d391a --- /dev/null +++ b/doc/lambda2-docinfo-footer.html @@ -0,0 +1,6 @@ + diff --git a/doc/lambda2.adoc b/doc/lambda2.adoc new file mode 100644 index 0000000..d766f97 --- /dev/null +++ b/doc/lambda2.adoc @@ -0,0 +1,20 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +# Lambda2: A {cpp}14 Lambda Library +Peter Dimov +:toc: left +:toclevels: 4 +:idprefix: +:docinfo: private-footer + +:leveloffset: +1 + +include::lambda2/overview.adoc[] +include::lambda2/reference.adoc[] +include::lambda2/copyright.adoc[] + +:leveloffset: -1 diff --git a/doc/lambda2/copyright.adoc b/doc/lambda2/copyright.adoc new file mode 100644 index 0000000..35ad50f --- /dev/null +++ b/doc/lambda2/copyright.adoc @@ -0,0 +1,12 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#copyright] +# Copyright and License +:idprefix: + +This documentation is copyright 2020 Peter Dimov and is distributed under +the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0]. diff --git a/doc/lambda2/overview.adoc b/doc/lambda2/overview.adoc new file mode 100644 index 0000000..6d2d241 --- /dev/null +++ b/doc/lambda2/overview.adoc @@ -0,0 +1,30 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#overview] +# Overview +:idprefix: overview_ + +## Description + +... + +## Usage Examples + +... + +## Dependencies + +None. A single, self-contained header. + +## Supported Compilers + +* GCC 5 or later with `-std=c++14` or above +* 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 +https://ci.appveyor.com/project/pdimov/lambda2[Appveyor]. diff --git a/doc/lambda2/reference.adoc b/doc/lambda2/reference.adoc new file mode 100644 index 0000000..276d523 --- /dev/null +++ b/doc/lambda2/reference.adoc @@ -0,0 +1,219 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#reference] +# Reference +:idprefix: ref_ + +## + +### Synopsis + +``` +namespace boost { +namespace lambda2 { + +template auto operator+( A && a, B && b ); +template auto operator-( A && a, B && b ); +template auto operator*( A && a, B && b ); +template auto operator/( A && a, B && b ); +template auto operator%( A && a, B && b ); +template auto operator-( A && a ); + +template auto operator==( A && a, B && b ); +template auto operator!=( A && a, B && b ); +template auto operator>( A && a, B && b ); +template auto operator<( A && a, B && b ); +template auto operator>=( A && a, B && b ); +template auto operator<=( A && a, B && b ); + +template auto operator&&( A && a, B && b ); +template auto operator||( A && a, B && b ); +template auto operator!( A && a ); + +template auto operator&( A && a, B && b ); +template auto operator|( A && a, B && b ); +template auto operator^( A && a, B && b ); +template auto operator~( A && a ); + +} // namespace lambda2 +} // namespace boost +``` + +### Definitions + +A type `T` is a _lambda expression_ if, for the type `T2` that is +`std::remove_cv_t>`, the expression +`std::is_placeholder::value || std::is_bind_expression::value` +is `true`. + +All operators defined in the subsequent sections only participate in +overload resolution if at least one of their operands is a _lambda +expression_. + +### Arithmetic Operators + +``` +template auto operator+( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::plus<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator-( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::minus<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator*( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::multiplies<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator/( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::divides<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator%( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::modulus<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator-( A && a ); +``` +[none] +* {blank} ++ +Returns: :: + `std::bind( std::negate<>(), std::forward(a) );` + +### Relational Operators + +``` +template auto operator==( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::equal_to<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator!=( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::not_equal_to<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator>( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::greater<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator<( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::less<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator>=( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::greater_equal<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator<=( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: + `std::bind( std::less_equal<>(), std::forward(a), std::forward(b) );` + +### Logical Operators + +``` +template auto operator&&( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::logical_and<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator||( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::logical_or<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator!( A && a ); +``` +[none] +* {blank} ++ +Returns: :: + `std::bind( std::logical_not<>(), std::forward(a) );` + +### Bitwise Operators + +``` +template auto operator&( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::bit_and<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator|( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::bit_or<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator^( A && a, B && b ); +``` +[none] +* {blank} ++ +Returns: :: `std::bind( std::bit_xor<>(), std::forward(a), std::forward(b) );` + +``` +template auto operator~( A && a ); +``` +[none] +* {blank} ++ +Returns: :: + `std::bind( std::bit_not<>(), std::forward(a) );` diff --git a/index.html b/index.html new file mode 100644 index 0000000..995feec --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + +Automatic redirection failed, please go to +doc/html/lambda2.html. + + +