2
0
mirror of https://github.com/boostorg/lambda.git synced 2026-01-21 17:02:36 +00:00

Compare commits

..

83 Commits

Author SHA1 Message Date
Peter Dimov
bbbe1a9041 Update .travis.yml 2021-05-18 03:20:52 +03:00
Peter Dimov
1a8f8cfead Update .travis.yml 2021-05-18 03:18:03 +03:00
Peter Dimov
7be3075575 Merge branch 'develop' 2021-05-18 03:10:07 +03:00
Peter Dimov
ddf7dfe25e Add CMakeLists.txt 2021-03-19 04:33:05 +02:00
Glen Fernandes
8de6d9cb9f Make all include guards BOOST_LAMBDA_ prefixed 2019-12-24 18:54:19 -05:00
Glen Fernandes
d27fc70114 Merge pull request #14 from tinko92/develop
Fix broken sgi/stl links.
2019-04-24 05:49:02 +10:00
Tinko Bartels
1c11cf9570 Fix broken sgi/stl links. 2019-04-23 19:38:24 +02:00
Edward Diener
7355f36b9f Updated for b2 cmake support. 2018-12-19 22:30:41 -05:00
Edward Diener
8824e81d52 Merge branch 'develop' 2018-10-25 22:20:53 -04:00
Edward Diener
6395013860 Merge pull request #13 from danieljames/remove-random-shuffle-support-when-appropriate
Only support std::random_shuffle when available
2018-04-19 23:43:00 -04:00
Daniel James
8c0410fff5 Only support std::random_shuffle when available
It was removed in C++17. We could emulate it when it isn't available,
but that doesn't seem worth the effort.
2018-04-07 15:10:29 +01:00
Edward Diener
b8a2f400ac Merge branch 'develop' 2018-02-20 09:07:34 -05:00
Edward Diener
4fc4454f3e Merge pull request #12 from Kojoley/fix-unused-variable-warnings-from-core_hpp
Fixed unused variable warnings from core.hpp
2017-11-11 13:39:03 -05:00
Nikita Kniazev
02999cca47 Fixed unused variable warnings from core.hpp 2017-11-10 15:48:28 +03:00
eldiener
e8eda93ef0 Merge branch 'develop' 2017-10-30 11:44:46 -04:00
eldiener
9d171774af Removed --depth 1 2017-10-29 21:44:06 -04:00
eldiener
f4b5e00a4f Merge branch 'develop' 2017-10-27 22:27:04 -04:00
Edward Diener
42b499ec9b Better appveyor file setup. 2017-10-09 12:08:07 -04:00
Edward Diener
61119a8e37 Added Appveyor file and Travis CI file. 2017-10-09 08:18:50 -04:00
Edward Diener
4b00716f5f Merge branch 'develop' 2017-09-26 12:05:44 -04:00
Edward Diener
4baf512ed2 Removed executable flag. 2017-09-16 06:59:04 -04:00
Edward Diener
4c0ef8e469 Merge branch 'develop' 2017-01-04 11:21:46 -05:00
Edward Diener
18bc9b84cb Updated link for fc++. 2016-12-19 20:23:07 -05:00
Edward Diener
ad5673c9de Use std::bind instead of std::bind1st when appropriate 2016-11-07 12:42:43 -05:00
Rene Rivera
8d9106ab17 Add, and update, documentation build targets. 2016-10-10 11:39:50 -05:00
Rene Rivera
f12bd0ef93 Add, and update, documentation build targets. 2016-10-07 23:07:34 -05:00
Edward Diener
b788075b6d Merge branch 'develop' 2015-10-16 21:38:07 -04:00
Edward Diener
5508ede384 Merge pull request #10 from mclow/develop
Remove mentions of deprecated macros
2015-09-11 04:40:43 -04:00
Marshall Clow
e4b5434e27 Remove mentions of deprecated macros in documentation 2015-09-10 20:01:11 -07:00
Edward Diener
4c4387a277 Merge branch 'develop' 2015-07-19 00:12:41 -04:00
Edward Diener
0f44d72275 Remove unnecessary header. 2015-05-18 19:55:22 -04:00
Edward Diener
723485bfa7 Merge branch 'develop' of https://github.com/boostorg/lambda into develop 2015-05-18 19:05:23 -04:00
Edward Diener
f85d2f0025 Merge pull request #9 from eldiener/develop
Changes for type_traits Version2
2015-05-18 19:04:38 -04:00
Edward Diener
45c391b380 Merge branch 'develop' of https://github.com/boostorg/lambda into develop 2015-05-18 19:03:04 -04:00
Edward Diener
69482a3b49 Merge pull request #6 from alexhenrie/develop
Correct spelling of "suppress"
2015-05-18 18:46:55 -04:00
Edward Diener
0afac59bc1 Merge pull request #4 from jzmaddock/patch-5
Update operator_return_type_traits.hpp
2015-05-18 18:43:23 -04:00
Edward Diener
5a6ae7f79d Merge pull request #3 from jzmaddock/patch-4
Update return_type_traits.hpp
2015-05-18 18:42:17 -04:00
Edward Diener
9a581dafb7 Added 'void const' specialization to fix problem with clang 2015-05-06 16:23:39 -04:00
Edward Diener
5e574813a2 Simplifed using direct operators rather than mpl constructs. 2015-04-27 03:00:19 -04:00
Edward Diener
11a6698eec Remove ice_xxx.hpp header and change functionality to use mpl. 2015-03-31 03:32:50 -04:00
Edward Diener
5ba2e0aa6a This file needs to include the type_traits headers it actually uses - problem exposed by ongoing type traits rewrite. 2015-03-05 11:02:49 -05:00
Edward Diener
59e1516609 This header should include the type_traits headers it needs and not depend on implicit inclusion which will go away in the current type_traits rewrite. 2015-03-05 11:02:19 -05:00
Alex Henrie
fba5d5e822 Correct spelling of "suppress" 2015-02-07 01:57:05 -07:00
jzmaddock
635d0fb6ce Update operator_return_type_traits.hpp
This file needs to include the type_traits headers it actually uses - problem exposed by ongoing type traits rewrite.
2015-01-21 17:03:07 +00:00
jzmaddock
ba8e62af76 Update return_type_traits.hpp
This header should include the type_traits hedaers it needs and not depend on implicit inclusion which will go away in the current type_traits rewrite.
2015-01-21 17:00:41 +00:00
Noel Belcourt
545b6af540 Merge pull request #1 from jzmaddock/patch-2
Update Jamfile.v2

Thanks John.
2014-11-02 15:44:45 -07:00
Noel Belcourt
ce6b030b06 Merge pull request #2 from danieljames/metadata
Create metadata file.
2014-09-01 20:33:39 -06:00
Daniel James
ecf547cbef Add metadata file. 2014-08-18 15:55:52 +01:00
jzmaddock
aef7c9fe51 Update Jamfile.v2
There can be only one project named boost/doc - and we already have that under doc/
This fixes the PDF doc build.
2014-08-13 18:29:22 +01:00
Daniel James
677be04dd7 Create merge base for git. 2014-06-01 19:21:47 +01:00
Daniel James
7d1d0d4fdd Remove file accidentally recreated by git conversion.
Some old files deleted in the CVS days were accidentally restored, this
appears to be one of them. You can see it wasn't in subversion at:

http://svn.boost.org/svn/boost/trunk/libs/lambda/
2014-06-01 19:20:51 +01:00
Stephen Kelly
7d21ea7cbb Lambda: Remove obsolete GCC version checks.
[SVN r86072]
2013-09-30 16:00:14 +00:00
Stephen Kelly
0d069c2c0c Remove use of obsolete BOOST_NO_TEMPLATED_STREAMS macro.
It was only defined for no-longer-supported-gcc.

[SVN r86062]
2013-09-30 15:56:52 +00:00
Steven Watanabe
25d6c0e3b1 Merge lambda from the trunk.
[SVN r83442]
2013-03-15 18:07:37 +00:00
Steven Watanabe
4545234f94 Handle const lambda functors for nullary result_of. Fixes #6914.
[SVN r83020]
2013-02-19 19:52:03 +00:00
Steven Watanabe
657a0b9dd7 Handle nullary result_of. Fixes #6914.
[SVN r82935]
2013-02-16 20:26:34 +00:00
Steven Watanabe
fab5a8041b Remove name of unused parameter. Fixes #8033.
[SVN r82932]
2013-02-16 20:01:07 +00:00
Marshall Clow
55cd962166 Merge comment typo fixes to release; Fixes #7714
[SVN r82236]
2012-12-28 16:54:24 +00:00
Marshall Clow
9c376db7e5 Fixed 'the the' in comments; Refs #7714
[SVN r82235]
2012-12-28 16:51:09 +00:00
Steven Watanabe
3caa685662 Merge [67640] from the trunk.
[SVN r70065]
2011-03-17 16:29:28 +00:00
Daniel Walker
2c14c3a13b merged changeset 63726 from trunk
[SVN r63907]
2010-07-12 01:36:38 +00:00
Steven Watanabe
0d0f71272e Merge lambda from the trunk
[SVN r63555]
2010-07-03 19:05:15 +00:00
Daniel James
08b3f6336c Merge documentation fixes.
* Use `doc/src/*.css` instead of `doc/html/*.css`.
* Remove wiki and people directories.
* Some documentation fixes.
* Left out `minimal.css` changes and boostbook changes because of clashes.


[SVN r63347]
2010-06-26 12:30:09 +00:00
Troy D. Straszheim
e368877636 rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
Troy D. Straszheim
22bc52b7c4 Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
Steven Watanabe
8a943f6510 Merge [43113], [45097], [53261], [53343], [53648], [53649], and [53651] from the trunk
[SVN r53875]
2009-06-13 21:18:10 +00:00
Steven Watanabe
d69f83d074 Merge [53061] and [53233] from the trunk
[SVN r53266]
2009-05-26 00:59:17 +00:00
Steven Watanabe
7648a7adf1 Merge [51448] from the trunk.
[SVN r51617]
2009-03-05 03:52:26 +00:00
John Maddock
48e6f45d92 Merge PDF build changes from Trunk.
[SVN r51417]
2009-02-23 18:39:32 +00:00
Steven Watanabe
927a04351e Merge [50516] and [50999] from the trunk. These are the fixes for #781 and #2446 respectively
[SVN r51368]
2009-02-21 18:10:20 +00:00
Troy D. Straszheim
b5b41af8f4 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
Marshall Clow
1f6ca994e6 Merged revisions 50413 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r50413 | marshall | 2008-12-30 10:27:43 -0800 (Tue, 30 Dec 2008) | 1 line
  
  Typo: fixes bug #2583
........


[SVN r50602]
2009-01-15 03:46:14 +00:00
Beman Dawes
4a254c4161 With his kind permission, change Jaakko "Järvi" to "Jarvi"
[SVN r46809]
2008-06-28 13:57:20 +00:00
Beman Dawes
e67976c740 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
Beman Dawes
a0cd34c938 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
Beman Dawes
672c8e10d4 Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
nobody
87dd3997e7 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
Daniel James
b112fb9254 Fix a link.
[SVN r36651]
2007-01-07 22:42:25 +00:00
Jaakko Järvi
13ec0c5bbc fixed omission
[SVN r36201]
2006-11-29 19:28:48 +00:00
Jaakko Järvi
29ab5a2814 fixed bug 1444052
[SVN r36200]
2006-11-29 19:21:46 +00:00
Beman Dawes
a0cfe43611 Merged copyright and license addition
[SVN r35907]
2006-11-07 19:27:00 +00:00
Rene Rivera
fe858cf734 Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
nobody
b3120233dc This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
23 changed files with 339 additions and 97 deletions

163
.travis.yml Normal file
View File

@@ -0,0 +1,163 @@
# Copyright 2016 Edward Diener
# Copyright 2016, 2017, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
language: cpp
dist: xenial
branches:
only:
- master
- develop
- /feature\/.*/
env:
matrix:
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
compiler: g++-4.4
env: TOOLSET=gcc CXXSTD=98
addons:
apt:
packages:
- g++-4.4
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.6
env: TOOLSET=gcc CXXSTD=03,0x
addons:
apt:
packages:
- g++-4.6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.8
env: TOOLSET=gcc CXXSTD=03,11
addons:
apt:
packages:
- g++-4.8
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc CXXSTD=03,11,14
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-7
env: TOOLSET=gcc CXXSTD=03,11,14,17
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: TOOLSET=gcc CXXSTD=03,11,14,17
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
dist: bionic
compiler: g++-10
env: TOOLSET=gcc CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- g++-10
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: bionic
compiler: g++-11
env: UBSAN=1 TOOLSET=gcc CXXSTD=03,11,14,17,20 UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
addons:
apt:
packages:
- g++-11
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
compiler: clang++-11
env: TOOLSET=clang CXXSTD=03,11,14,17,20
addons:
apt:
packages:
- clang-11
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-11 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
compiler: clang++-12
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,20 UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- clang-12
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- os: linux
dist: bionic
compiler: clang++-libc++
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- libc++-dev
- os: osx
compiler: clang++
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd ..
- git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/boostdep
- cp -r $TRAVIS_BUILD_DIR/* libs/lambda
- python tools/boostdep/depinst/depinst.py lambda
- ./bootstrap.sh
- ./b2 headers
script:
- |-
echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
- ./b2 -j3 libs/lambda/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
notifications:
email:
on_success: always

34
CMakeLists.txt Normal file
View File

@@ -0,0 +1,34 @@
# Generated by `boostdep --cmake lambda`
# Copyright 2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_lambda VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_lambda INTERFACE)
add_library(Boost::lambda ALIAS boost_lambda)
target_include_directories(boost_lambda INTERFACE include)
target_link_libraries(boost_lambda
INTERFACE
Boost::bind
Boost::config
Boost::core
Boost::detail
Boost::iterator
Boost::mpl
Boost::preprocessor
Boost::tuple
Boost::type_traits
Boost::utility
)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()

38
appveyor.yml Normal file
View File

@@ -0,0 +1,38 @@
# Copyright 2017 Edward Diener
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- master
- develop
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
install:
- cd ..
- git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- git submodule update --init tools/boost_install
- git submodule update --init libs/headers
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\lambda
- python tools/boostdep/depinst/depinst.py lambda
- bootstrap
- b2 headers
build: off
test_script:
- b2 libs/lambda/test toolset=%TOOLSET%

View File

@@ -1,4 +1,4 @@
project boost/doc ;
project lambda/doc ;
import boostbook : boostbook ;
# Are these really the correct images??
@@ -10,3 +10,12 @@ boostbook lambda-doc : lambda.xml
<format>pdf:<xsl:param>img.src.path=$(images)/
;
###############################################################################
alias boostdoc
: lambda.xml
:
:
: ;
explicit boostdoc ;
alias boostrelease ;
explicit boostrelease ;

View File

@@ -3281,7 +3281,7 @@ was dropped.
<abbrev>SGI02</abbrev>
<title>The SGI Standard Template Library</title>
<pubdate>2002</pubdate>
<bibliomisc><ulink url="http://www.sgi.com/tech/stl/">www.sgi.com/tech/stl/</ulink></bibliomisc>
<bibliomisc><ulink url="https://www.boost.org/sgi/stl/">www.boost.org/sgi/stl/</ulink></bibliomisc>
</biblioentry>
@@ -3435,7 +3435,7 @@ was dropped.
<firstname>Brian</firstname>
<surname>McNamara</surname>
</author>
<bibliomisc><ulink url="http://www.cc.gatech.edu/~yannis/fc++/">www.cc.gatech.edu/~yannis/fc++/</ulink>
<bibliomisc><ulink url="http://yanniss.github.io/fc++/">yanniss.github.io/fc++/ </ulink>
</bibliomisc>
<pubdate>2002</pubdate>
</biblioentry>

View File

@@ -3286,7 +3286,7 @@ was dropped.
<abbrev>SGI02</abbrev>
<title>The SGI Standard Template Library</title>
<pubdate>2002</pubdate>
<bibliomisc><ulink url="http://www.sgi.com/tech/stl/">www.sgi.com/tech/stl/</ulink></bibliomisc>
<bibliomisc><ulink url="https://www.boost.org/sgi/stl/">www.boost.org/sgi/stl/</ulink></bibliomisc>
</biblioentry>
@@ -3440,7 +3440,7 @@ was dropped.
<firstname>Brian</firstname>
<surname>McNamara</surname>
</author>
<bibliomisc><ulink url="http://www.cc.gatech.edu/~yannis/fc++/">www.cc.gatech.edu/~yannis/fc++/</ulink>
<bibliomisc><ulink url="http://yanniss.github.io/fc++/">yanniss.github.io/fc++/ </ulink>
</bibliomisc>
<pubdate>2002</pubdate>
</biblioentry>

View File

@@ -684,6 +684,8 @@ struct rotate_copy {
// random_shuffle ---------------------------------
#ifndef BOOST_NO_CXX98_RANDOM_SHUFFLE
struct random_shuffle {
template <class Args>
@@ -703,6 +705,7 @@ struct random_shuffle {
};
#endif
// partition ---------------------------------

View File

@@ -11,8 +11,8 @@
URL: http://spirit.sourceforge.net/
==============================================================================*/
#ifndef PHOENIX_CLOSURES_HPP
#define PHOENIX_CLOSURES_HPP
#ifndef BOOST_LAMBDA_CLOSURES_HPP
#define BOOST_LAMBDA_CLOSURES_HPP
///////////////////////////////////////////////////////////////////////////////
#include "boost/lambda/core.hpp"

View File

@@ -22,6 +22,8 @@
#ifndef BOOST_LAMBDA_CORE_HPP
#define BOOST_LAMBDA_CORE_HPP
#include "boost/config.hpp"
#include "boost/type_traits/transform_traits.hpp"
#include "boost/type_traits/cv_traits.hpp"
@@ -66,9 +68,9 @@ namespace {
boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type();
boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
boost::lambda::placeholder1_type& _1 = free1;
boost::lambda::placeholder2_type& _2 = free2;
boost::lambda::placeholder3_type& _3 = free3;
boost::lambda::placeholder1_type& BOOST_ATTRIBUTE_UNUSED _1 = free1;
boost::lambda::placeholder2_type& BOOST_ATTRIBUTE_UNUSED _2 = free2;
boost::lambda::placeholder3_type& BOOST_ATTRIBUTE_UNUSED _3 = free3;
// _1, _2, ... naming scheme by Peter Dimov
} // unnamed

View File

@@ -22,13 +22,6 @@
# define BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
# define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
# endif
# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97)
# define BOOST_NO_TEMPLATED_STREAMS
# define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
# endif
# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
# define BOOST_LAMBDA_FAILS_IN_TEMPLATE_KEYWORD_AFTER_SCOPE_OPER
# endif
# endif // __GNUC__

View File

@@ -15,6 +15,7 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/utility/result_of.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
@@ -297,6 +298,38 @@ public:
} // namespace lambda
} // namespace boost
namespace boost {
#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_DECLTYPE)
template<class T>
struct result_of<boost::lambda::lambda_functor<T>()>
{
typedef typename boost::lambda::lambda_functor<T>::nullary_return_type type;
};
template<class T>
struct result_of<const boost::lambda::lambda_functor<T>()>
{
typedef typename boost::lambda::lambda_functor<T>::nullary_return_type type;
};
#endif
template<class T>
struct tr1_result_of<boost::lambda::lambda_functor<T>()>
{
typedef typename boost::lambda::lambda_functor<T>::nullary_return_type type;
};
template<class T>
struct tr1_result_of<const boost::lambda::lambda_functor<T>()>
{
typedef typename boost::lambda::lambda_functor<T>::nullary_return_type type;
};
}
// is_placeholder
#include <boost/is_placeholder.hpp>

View File

@@ -282,6 +282,11 @@ struct const_copy_argument<void> {
typedef void type;
};
template<>
struct const_copy_argument<void const> {
typedef void type;
};
// Does the same as const_copy_argument, but passes references through as such
template<class T>

View File

@@ -12,7 +12,13 @@
#define BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
#include "boost/lambda/detail/is_instance_of.hpp"
#include "boost/type_traits/same_traits.hpp"
#include "boost/type_traits/is_same.hpp"
#include "boost/type_traits/is_pointer.hpp"
#include "boost/type_traits/is_float.hpp"
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/remove_pointer.hpp"
#include "boost/type_traits/remove_const.hpp"
#include "boost/type_traits/remove_reference.hpp"
#include "boost/indirect_reference.hpp"
#include "boost/detail/container_fwd.hpp"
@@ -536,36 +542,6 @@ struct return_type_2<bitwise_action<Act>, A, B>
namespace detail {
#ifdef BOOST_NO_TEMPLATED_STREAMS
template<class A, class B>
struct leftshift_type {
typedef typename detail::IF<
boost::is_convertible<
typename boost::remove_reference<A>::type*,
std::ostream*
>::value,
std::ostream&,
typename detail::remove_reference_and_cv<A>::type
>::RET type;
};
template<class A, class B>
struct rightshift_type {
typedef typename detail::IF<
boost::is_convertible<
typename boost::remove_reference<A>::type*,
std::istream*
>::value,
std::istream&,
typename detail::remove_reference_and_cv<A>::type
>::RET type;
};
#else
template <class T> struct get_ostream_type {
typedef std::basic_ostream<typename T::char_type,
@@ -602,7 +578,6 @@ public:
};
#endif
} // end detail

View File

@@ -161,23 +161,6 @@ namespace detail {
// Note that the overloading is const vs. non-const first argument
#ifdef BOOST_NO_TEMPLATED_STREAMS
template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
typedef typename detail::IF<
boost::is_convertible<T*, std::ostream*>::value,
T&,
typename const_copy_argument <T>::type
>::RET type;
};
template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
typedef typename detail::IF<
boost::is_convertible<T*, std::istream*>::value,
T&,
typename const_copy_argument <T>::type
>::RET type;
};
#else
template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
typedef typename detail::IF<
@@ -198,7 +181,6 @@ template<class T> struct convert_istream_to_ref_others_to_c_plain_by_default {
typename const_copy_argument <T>::type
>::RET type;
};
#endif
} // detail

View File

@@ -284,7 +284,7 @@ inline const
lambda_functor<
lambda_functor_base<do_nothing_action, null_type>
>
make_void(const Arg1& a1) {
make_void(const Arg1&) {
return
lambda_functor_base<do_nothing_action, null_type>();
}

View File

@@ -19,10 +19,6 @@
namespace boost {
namespace lambda {
using ::boost::type_traits::ice_and;
using ::boost::type_traits::ice_or;
using ::boost::type_traits::ice_not;
// Much of the type deduction code for standard arithmetic types
// from Gary Powell
@@ -77,8 +73,7 @@ template <class Act, class A> struct return_type_1_prot {
public:
typedef typename
detail::IF<
// is_protectable<Act>::value && is_lambda_functor<A>::value,
ice_and<is_protectable<Act>::value, is_lambda_functor<A>::value>::value,
is_protectable<Act>::value && is_lambda_functor<A>::value,
lambda_functor<
lambda_functor_base<
Act,
@@ -112,9 +107,7 @@ namespace detail {
// add const to rvalues, so that all rvalues are stored as const in
// the args tuple
typedef typename detail::IF_type<
// boost::is_reference<T>::value && !boost::is_const<non_ref_T>::value,
ice_and<boost::is_reference<T>::value,
ice_not<boost::is_const<non_ref_T>::value>::value>::value,
boost::is_reference<T>::value && !boost::is_const<non_ref_T>::value,
detail::identity_mapping<T>,
const_copy_argument<non_ref_T> // handles funtion and array
>::type type; // types correctly
@@ -148,11 +141,8 @@ template <class Act, class A, class B> struct return_type_2_prot {
typedef typename
detail::IF<
// is_protectable<Act>::value &&
// (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
ice_and<is_protectable<Act>::value,
ice_or<is_lambda_functor<A>::value,
is_lambda_functor<B>::value>::value>::value,
is_protectable<Act>::value &&
(is_lambda_functor<A>::value || is_lambda_functor<B>::value),
lambda_functor<
lambda_functor_base<
Act,
@@ -187,11 +177,8 @@ struct return_type_2_comma
typedef typename
detail::IF<
// is_protectable<other_action<comma_action> >::value && // it is protectable
// (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
ice_and<is_protectable<other_action<comma_action> >::value, // it is protectable
ice_or<is_lambda_functor<A>::value,
is_lambda_functor<B>::value>::value>::value,
is_protectable<other_action<comma_action> >::value && // it is protectable
(is_lambda_functor<A>::value || is_lambda_functor<B>::value),
lambda_functor<
lambda_functor_base<
other_action<comma_action>,

View File

@@ -10,8 +10,8 @@
// ------------------------------------------------------------
#ifndef BOOST_LAMBDA_SUPRESS_UNUSED_HPP
#define BOOST_LAMBDA_SUPRESS_UNUSED_HPP
#ifndef BOOST_LAMBDA_SUPPRESS_UNUSED_HPP
#define BOOST_LAMBDA_SUPPRESS_UNUSED_HPP
namespace boost {
namespace lambda {

View File

@@ -345,7 +345,7 @@ public:
// is true, the true_statement (again an lambda_functor) is executed
// otherwise, the false_statement (another lambda_functor) is executed. The
// result type of this is void. Note the trailing underscore after
// if_ and the the leading dot and the trailing underscore before
// if_ and the leading dot and the trailing underscore before
// and after .else_.
//
///////////////////////////////////////////////////////////////////////////////

View File

@@ -24,11 +24,6 @@
#include "boost/lambda/detail/operators.hpp"
#ifndef BOOST_LAMBDA_FAILS_IN_TEMPLATE_KEYWORD_AFTER_SCOPE_OPER
// sorry, member ptr does not work with gcc2.95
#include "boost/lambda/detail/member_ptr.hpp"
#endif
#endif

View File

@@ -348,7 +348,7 @@ while_(CondT const& cond)
// While the condition (an lambda_functor) evaluates to true, statement
// (another lambda_functor) is executed. The statement is executed at least
// once. The result type of this is void. Note the trailing
// underscore after do_ and the the leading dot and the trailing
// underscore after do_ and the leading dot and the trailing
// underscore before and after .while_.
//
///////////////////////////////////////////////////////////////////////////////

15
meta/libraries.json Normal file
View File

@@ -0,0 +1,15 @@
{
"key": "lambda",
"name": "Lambda",
"authors": [
"Jaakko Järvi",
"Gary Powell"
],
"description": "Define small unnamed function objects at the actual call site, and more.",
"category": [
"Function-objects"
],
"maintainers": [
"Jaakko Jarvi <jarvi -at- cs.tamu.edu>"
]
}

View File

@@ -121,8 +121,16 @@ void test_unlambda() {
BOOST_CHECK(call_with_101(_1 + 1) == 102);
#if defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
BOOST_CHECK(call_with_100(bl::bind(std_functor(std::bind1st(std::plus<int>(), 1)), _1)) == 101);
#else
BOOST_CHECK(call_with_100(bl::bind(std_functor(std::bind(std::plus<int>(), 1, std::placeholders::_1)), _1)) == 101);
#endif
// std_functor insturcts LL that the functor defines a result_type typedef
// rather than a sig template.
bl::bind(std_functor(std::plus<int>()), _1, _2)(i, i);

View File

@@ -299,7 +299,7 @@ int test_main(int, char *[]) {
BOOST_CHECK(boost::lambda::bind(with_result_template_reference(), var(one), var(two), var(three), var(four), var(five), var(six), var(seven), var(eight), var(nine))() == 9);
// Check using result_of with lambda functors
//BOOST_CHECK(apply0(constant(0)) == 0);
BOOST_CHECK(apply0(constant(0)) == 0);
BOOST_CHECK(apply1<int>(_1, one) == 1);
BOOST_CHECK(apply1<int&>(_1, one) == 1);
BOOST_CHECK(apply1<const int&>(_1, one) == 1);