2
0
mirror of https://github.com/boostorg/lambda.git synced 2026-01-21 04:52:25 +00:00

Compare commits

...

23 Commits

Author SHA1 Message Date
Peter Dimov
0068b4d90d Update ci.yml 2025-05-03 03:20:27 +03:00
Peter Dimov
9b378ee3d0 Merge pull request #28 from grafikrobot/modular
Add support for modular build structure.
2025-05-02 19:13:07 +03:00
Rene Rivera
eb079473e2 Move project global include to target local include. 2025-04-07 17:37:01 -05:00
Rene Rivera
8e2446440c Sync from upstream. 2025-04-04 21:39:38 -05:00
Peter Dimov
593ddc7382 Apply Node20 workaround 2025-02-08 18:55:43 +02:00
Peter Dimov
9fd5cd190e Update test/CMakeLists.txt 2025-02-08 18:53:27 +02:00
Peter Dimov
cd036b65e2 Update ci.yml 2025-02-08 18:50:51 +02:00
Rene Rivera
7e792bbbef Update build deps. 2024-08-03 16:10:28 -05:00
Rene Rivera
bd56ab5976 Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:22 -05:00
Rene Rivera
717daf5483 Update copyright dates. 2024-07-20 22:52:03 -05:00
Rene Rivera
b3d68b5e4e Change all <source> references to <library>. 2024-07-20 19:40:11 -05:00
Rene Rivera
f26babea3c Bump B2 require to 5.2 2024-06-14 11:33:55 -05:00
Rene Rivera
0d1820513c Add requires-b2 check to top-level build file. 2024-05-05 09:00:01 -05:00
Rene Rivera
5968889209 Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:15:59 -05:00
Rene Rivera
ea61b3aa85 Make the library modular usable. 2024-03-11 08:38:17 -05:00
Peter Dimov
1555e9c7ff Update ci.yml 2023-11-17 17:21:43 +02:00
Peter Dimov
a3956c27c7 Remove C++03 compilers from appveyor.yml 2023-11-17 01:00:35 +02:00
Peter Dimov
ac26514243 Include boost/config.hpp in construct.hpp 2021-12-28 01:06:03 +02:00
Peter Dimov
6b124b66f7 Merge pull request #25 from RaisinTen/use-forward-in-construct.hpp
Use variadic templates to get rid of manual overloads in construct.hpp
2021-12-28 01:02:21 +02:00
Darshan Sen
568a4d2a63 Use variadic templates to get rid of manual overloads in construct.hpp
There is no need to write the overloads manually and limiting our users
to a max of 10 arguments when we can forward universal references to the
constructors.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>
2021-12-27 12:01:24 +05:30
Peter Dimov
40b6f20419 Merge branch 'feature/issue-24' into develop 2021-12-27 00:14:01 +02:00
Peter Dimov
cedabad897 Merge pull request #22 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-12-26 19:08:13 +02:00
Edward Diener
b90488068a [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. 2021-01-20 13:08:07 -05:00
7 changed files with 408 additions and 82 deletions

View File

@@ -18,103 +18,195 @@ jobs:
matrix: matrix:
include: include:
- toolset: gcc-4.8 - toolset: gcc-4.8
cxxstd: "03,11" cxxstd: "11"
os: ubuntu-18.04 os: ubuntu-latest
container: ubuntu:18.04
install: g++-4.8 install: g++-4.8
- toolset: gcc-5 - toolset: gcc-5
cxxstd: "03,11,14,1z" cxxstd: "11,14,1z"
os: ubuntu-18.04 os: ubuntu-latest
container: ubuntu:18.04
install: g++-5 install: g++-5
- toolset: gcc-6 - toolset: gcc-6
cxxstd: "03,11,14,1z" cxxstd: "11,14,1z"
os: ubuntu-18.04 os: ubuntu-latest
container: ubuntu:18.04
install: g++-6 install: g++-6
- toolset: gcc-7 - toolset: gcc-7
cxxstd: "03,11,14,17" cxxstd: "11,14,17"
os: ubuntu-18.04 container: ubuntu:20.04
os: ubuntu-latest
install: g++-7
- toolset: gcc-8 - toolset: gcc-8
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-18.04 container: ubuntu:20.04
os: ubuntu-latest
install: g++-8 install: g++-8
- toolset: gcc-9 - toolset: gcc-9
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
- toolset: gcc-10 - toolset: gcc-10
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
install: g++-10 install: g++-10
- toolset: gcc-11 - toolset: gcc-11
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 os: ubuntu-22.04
install: g++-11 - toolset: gcc-12
cxxstd: "11,14,17,20,2b"
os: ubuntu-22.04
install: g++-12
- toolset: gcc-13
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: g++-13
- toolset: gcc-14
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: g++-14
- toolset: clang - toolset: clang
compiler: clang++-3.9 compiler: clang++-3.9
cxxstd: "03,11,14" cxxstd: "11,14"
os: ubuntu-18.04 os: ubuntu-latest
container: ubuntu:18.04
install: clang-3.9 install: clang-3.9
- toolset: clang - toolset: clang
compiler: clang++-4.0 compiler: clang++-4.0
cxxstd: "03,11,14" cxxstd: "11,14"
os: ubuntu-18.04 os: ubuntu-latest
container: ubuntu:18.04
install: clang-4.0 install: clang-4.0
- toolset: clang - toolset: clang
compiler: clang++-5.0 compiler: clang++-5.0
cxxstd: "03,11,14,1z" cxxstd: "11,14,1z"
os: ubuntu-18.04 os: ubuntu-latest
container: ubuntu:18.04
install: clang-5.0 install: clang-5.0
- toolset: clang - toolset: clang
compiler: clang++-6.0 compiler: clang++-6.0
cxxstd: "03,11,14,17" cxxstd: "11,14,17"
os: ubuntu-18.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-6.0 install: clang-6.0
- toolset: clang - toolset: clang
compiler: clang++-7 compiler: clang++-7
cxxstd: "03,11,14,17" cxxstd: "11,14,17"
os: ubuntu-18.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-7 install: clang-7
- toolset: clang - toolset: clang
compiler: clang++-8 compiler: clang++-8
cxxstd: "03,11,14,17" cxxstd: "11,14,17"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-8 install: clang-8
- toolset: clang - toolset: clang
compiler: clang++-9 compiler: clang++-9
cxxstd: "03,11,14,17" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-9 install: clang-9
- toolset: clang - toolset: clang
compiler: clang++-10 compiler: clang++-10
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-10
- toolset: clang - toolset: clang
compiler: clang++-11 compiler: clang++-11
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-11
- toolset: clang - toolset: clang
compiler: clang++-12 compiler: clang++-12
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
install: clang-12
- toolset: clang - toolset: clang
compiler: clang++-12 compiler: clang++-13
stdlib: "libc++" cxxstd: "11,14,17,20,2b"
cxxstd: "03,11,14,17,2a" container: ubuntu:22.04
os: ubuntu-20.04 os: ubuntu-latest
install: install: clang-13
- clang-12
- libc++-12-dev
- libc++abi-12-dev
- toolset: clang - toolset: clang
cxxstd: "03,11,14,17,2a" compiler: clang++-14
os: macos-10.15 cxxstd: "11,14,17,20,2b"
container: ubuntu:22.04
os: ubuntu-latest
install: clang-14
- toolset: clang
compiler: clang++-15
cxxstd: "11,14,17,20,2b"
container: ubuntu:22.04
os: ubuntu-latest
install: clang-15
- toolset: clang
compiler: clang++-16
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: clang-16
- toolset: clang
compiler: clang++-17
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: clang-17
- toolset: clang
compiler: clang++-18
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: clang-18
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-13
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-14
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-15
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
container:
image: ${{matrix.container}}
volumes:
- /node20217:/node20217:rw,rshared
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
defaults:
run:
shell: bash
steps: steps:
- uses: actions/checkout@v2 - name: Setup container environment
if: matrix.container
run: |
apt-get update
apt-get -y install sudo python3 git g++ curl xz-utils
- name: Install nodejs20glibc2.17
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
run: |
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
ldd /__e/node20/bin/node
- uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
run: sudo apt-get install -y ${{join(matrix.install, ' ')}} run: |
sudo apt-get update
sudo apt-get -y install ${{matrix.install}}
- name: Setup Boost - name: Setup Boost
run: | run: |
@@ -134,7 +226,7 @@ jobs:
cd boost-root cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh ./bootstrap.sh
./b2 -d0 headers ./b2 -d0 headers
@@ -155,30 +247,30 @@ jobs:
matrix: matrix:
include: include:
- toolset: msvc-14.0 - toolset: msvc-14.0
cxxstd: "14" cxxstd: "14,latest"
addrmd: 32,64 addrmd: 32,64
os: windows-2019 os: windows-2019
- toolset: msvc-14.1
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2016
- toolset: msvc-14.2 - toolset: msvc-14.2
cxxstd: "14,17,latest" cxxstd: "14,17,20,latest"
addrmd: 32,64 addrmd: 32,64
os: windows-2019 os: windows-2019
- toolset: msvc-14.3 - toolset: msvc-14.3
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2022
- toolset: clang-win
cxxstd: "14,17,latest" cxxstd: "14,17,latest"
addrmd: 32,64 addrmd: 32,64
os: windows-2022 os: windows-2022
- toolset: gcc - toolset: gcc
cxxstd: "03,11,14,17,2a" cxxstd: "11,14,17,2a"
addrmd: 64 addrmd: 64
os: windows-2019 os: windows-2019
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Setup Boost - name: Setup Boost
shell: cmd shell: cmd
@@ -213,14 +305,16 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-18.04 - os: ubuntu-22.04
- os: ubuntu-20.04 - os: ubuntu-24.04
- os: macos-10.15 - os: macos-13
- os: macos-14
- os: macos-15
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
@@ -259,14 +353,16 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-18.04 - os: ubuntu-22.04
- os: ubuntu-20.04 - os: ubuntu-24.04
- os: macos-10.15 - os: macos-13
- os: macos-14
- os: macos-15
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
@@ -315,14 +411,16 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-18.04 - os: ubuntu-22.04
- os: ubuntu-20.04 - os: ubuntu-24.04
- os: macos-10.15 - os: macos-13
- os: macos-14
- os: macos-15
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install
@@ -363,3 +461,183 @@ jobs:
run: | run: |
cd ../boost-root/__build__ cd ../boost-root/__build__
ctest --output-on-failure --no-tests=error ctest --output-on-failure --no-tests=error
windows-cmake-subdir:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
echo LIBRARY: %LIBRARY%
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
- name: Use library with add_subdirectory (Debug)
shell: cmd
run: |
cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test
mkdir __build__ && cd __build__
cmake ..
cmake --build . --config Debug
ctest --output-on-failure --no-tests=error -C Debug
- name: Use library with add_subdirectory (Release)
shell: cmd
run: |
cd ../boost-root/libs/%LIBRARY%/test/cmake_subdir_test/__build__
cmake --build . --config Release
ctest --output-on-failure --no-tests=error -C Release
windows-cmake-install:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
echo LIBRARY: %LIBRARY%
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
- name: Configure
shell: cmd
run: |
cd ../boost-root
mkdir __build__ && cd __build__
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
- name: Install (Debug)
shell: cmd
run: |
cd ../boost-root/__build__
cmake --build . --target install --config Debug
- name: Install (Release)
shell: cmd
run: |
cd ../boost-root/__build__
cmake --build . --target install --config Release
- name: Use the installed library (Debug)
shell: cmd
run: |
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__
cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
cmake --build . --config Debug
ctest --output-on-failure --no-tests=error -C Debug
- name: Use the installed library (Release)
shell: cmd
run: |
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__
cmake --build . --config Release
ctest --output-on-failure --no-tests=error -C Release
windows-cmake-test:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
- os: windows-2022
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Setup Boost
shell: cmd
run: |
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
echo LIBRARY: %LIBRARY%
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
echo GITHUB_REF: %GITHUB_REF%
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
echo BOOST_BRANCH: %BOOST_BRANCH%
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
- name: Configure
shell: cmd
run: |
cd ../boost-root
mkdir __build__ && cd __build__
cmake -DBOOST_INCLUDE_LIBRARIES=%LIBRARY% -DBUILD_TESTING=ON ..
- name: Build tests (Debug)
shell: cmd
run: |
cd ../boost-root/__build__
cmake --build . --target tests --config Debug
- name: Run tests (Debug)
shell: cmd
run: |
cd ../boost-root/__build__
ctest --output-on-failure --no-tests=error -C Debug
- name: Build tests (Release)
shell: cmd
run: |
cd ../boost-root/__build__
cmake --build . --target tests --config Release
- name: Run tests (Release)
shell: cmd
run: |
cd ../boost-root/__build__
ctest --output-on-failure --no-tests=error -C Release

View File

@@ -15,10 +15,7 @@ branches:
environment: environment:
matrix: matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0 TOOLSET: msvc-14.0
ADDRMD: 32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0,msvc-14.0
ADDRMD: 32,64 ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1 TOOLSET: msvc-14.1
@@ -44,7 +41,6 @@ install:
build: off build: off
test_script: test_script:
- PATH=%ADDPATH%%PATH%
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% - if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD% - if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
- b2 -j3 libs/lambda/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker - b2 -j3 libs/lambda/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker

30
build.jam Normal file
View File

@@ -0,0 +1,30 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
require-b2 5.2 ;
constant boost_dependencies :
/boost/bind//boost_bind
/boost/config//boost_config
/boost/core//boost_core
/boost/detail//boost_detail
/boost/iterator//boost_iterator
/boost/mpl//boost_mpl
/boost/preprocessor//boost_preprocessor
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility ;
project /boost/lambda
;
explicit
[ alias boost_lambda : : :
: <include>include <library>$(boost_dependencies) ]
[ alias all : boost_lambda test ]
;
call-if : boost-library lambda
;

View File

@@ -16,6 +16,11 @@
#include "boost/type_traits/remove_cv.hpp" #include "boost/type_traits/remove_cv.hpp"
#include "boost/type_traits/is_pointer.hpp" #include "boost/type_traits/is_pointer.hpp"
#include "boost/config.hpp"
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#include <utility>
#endif
namespace boost { namespace boost {
namespace lambda { namespace lambda {
@@ -28,6 +33,12 @@ template<class T> struct constructor {
template <class U> struct sig { typedef T type; }; template <class U> struct sig { typedef T type; };
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <class... Args>
T operator()(Args&&... args) const {
return T(std::forward<Args>(args)...);
}
#else
T operator()() const { T operator()() const {
return T(); return T();
} }
@@ -81,6 +92,7 @@ template<class T> struct constructor {
T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const { T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const {
return T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); return T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
} }
#endif
}; };
@@ -137,6 +149,12 @@ template<class T> struct new_ptr {
template <class U> struct sig { typedef T* type; }; template <class U> struct sig { typedef T* type; };
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <class... Args>
T* operator()(Args&&... args) const {
return new T(std::forward<Args>(args)...);
}
#else
T* operator()() const { T* operator()() const {
return new T(); return new T();
} }
@@ -190,6 +208,7 @@ template<class T> struct new_ptr {
T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const { T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const {
return new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); return new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
} }
#endif
}; };

View File

@@ -11,5 +11,6 @@
], ],
"maintainers": [ "maintainers": [
"Jaakko Jarvi <jarvi -at- cs.tamu.edu>" "Jaakko Jarvi <jarvi -at- cs.tamu.edu>"
] ],
"cxxstd": "03"
} }

View File

@@ -6,6 +6,6 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
if(HAVE_BOOST_TEST) if(HAVE_BOOST_TEST)
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::lambda Boost::core Boost::any Boost::function) boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::lambda Boost::core Boost::any Boost::function Boost::smart_ptr)
endif() endif()

View File

@@ -1,17 +1,19 @@
# Lambda library # Lambda library
# Copyright (C) 2001-2003 Jaakko Järvi # Copyright (C) 2001-2003 Jaakko J<EFBFBD>rvi
# Use, modification and distribution is subject to the Boost Software License, # Use, modification and distribution is subject to the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt) # http://www.boost.org/LICENSE_1_0.txt)
# For more information, see http://www.boost.org/ # For more information, see http://www.boost.org/
import testing ; import testing ;
project : requirements <library>/boost/lambda//boost_lambda ;
run algorithm_test.cpp ; run algorithm_test.cpp ;
run bind_tests_advanced.cpp ; run bind_tests_advanced.cpp : : : <library>/boost/any//boost_any ;
run bind_tests_simple.cpp ; run bind_tests_simple.cpp ;
run bind_tests_simple_f_refs.cpp ; run bind_tests_simple_f_refs.cpp ;
run bll_and_function.cpp ; run bll_and_function.cpp ;