mirror of
https://github.com/boostorg/lambda.git
synced 2026-01-21 17:02:36 +00:00
Compare commits
137 Commits
boost-1.55
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0068b4d90d | ||
|
|
9b378ee3d0 | ||
|
|
eb079473e2 | ||
|
|
8e2446440c | ||
|
|
593ddc7382 | ||
|
|
9fd5cd190e | ||
|
|
cd036b65e2 | ||
|
|
7e792bbbef | ||
|
|
bd56ab5976 | ||
|
|
717daf5483 | ||
|
|
b3d68b5e4e | ||
|
|
f26babea3c | ||
|
|
0d1820513c | ||
|
|
5968889209 | ||
|
|
ea61b3aa85 | ||
|
|
1555e9c7ff | ||
|
|
a3956c27c7 | ||
|
|
ac26514243 | ||
|
|
6b124b66f7 | ||
|
|
568a4d2a63 | ||
|
|
40b6f20419 | ||
|
|
69dd8dd887 | ||
|
|
b17a0c91cd | ||
|
|
3bdaf7096d | ||
|
|
0b84b23cf7 | ||
|
|
0d81c1d25d | ||
|
|
cedabad897 | ||
|
|
24be4d3fe5 | ||
|
|
9709c066fe | ||
|
|
dbca56c00f | ||
|
|
074bc275c8 | ||
|
|
b873d8ef81 | ||
|
|
4bdbb29860 | ||
|
|
e81d400b03 | ||
|
|
5d87ace1e6 | ||
|
|
4007043b54 | ||
|
|
ca87d33f3d | ||
|
|
95e1de198e | ||
|
|
86451f2238 | ||
|
|
a96b87e777 | ||
|
|
bbbe1a9041 | ||
|
|
1a8f8cfead | ||
|
|
7be3075575 | ||
|
|
ddf7dfe25e | ||
|
|
b90488068a | ||
|
|
8de6d9cb9f | ||
|
|
641dd2b0a6 | ||
|
|
d27fc70114 | ||
|
|
1c11cf9570 | ||
|
|
7355f36b9f | ||
|
|
8824e81d52 | ||
|
|
6395013860 | ||
|
|
8c0410fff5 | ||
|
|
b8a2f400ac | ||
|
|
4fc4454f3e | ||
|
|
02999cca47 | ||
|
|
e8eda93ef0 | ||
|
|
9d171774af | ||
|
|
f4b5e00a4f | ||
|
|
42b499ec9b | ||
|
|
61119a8e37 | ||
|
|
4b00716f5f | ||
|
|
4baf512ed2 | ||
|
|
4c0ef8e469 | ||
|
|
18bc9b84cb | ||
|
|
ad5673c9de | ||
|
|
8d9106ab17 | ||
|
|
f12bd0ef93 | ||
|
|
b788075b6d | ||
|
|
5508ede384 | ||
|
|
e4b5434e27 | ||
|
|
4c4387a277 | ||
|
|
0f44d72275 | ||
|
|
723485bfa7 | ||
|
|
f85d2f0025 | ||
|
|
45c391b380 | ||
|
|
69482a3b49 | ||
|
|
0afac59bc1 | ||
|
|
5a6ae7f79d | ||
|
|
9a581dafb7 | ||
|
|
5e574813a2 | ||
|
|
11a6698eec | ||
|
|
5ba2e0aa6a | ||
|
|
59e1516609 | ||
|
|
fba5d5e822 | ||
|
|
635d0fb6ce | ||
|
|
ba8e62af76 | ||
|
|
545b6af540 | ||
|
|
ce6b030b06 | ||
|
|
ecf547cbef | ||
|
|
aef7c9fe51 | ||
|
|
677be04dd7 | ||
|
|
7d1d0d4fdd | ||
|
|
7d21ea7cbb | ||
|
|
0d069c2c0c | ||
|
|
4545234f94 | ||
|
|
657a0b9dd7 | ||
|
|
fab5a8041b | ||
|
|
9c376db7e5 | ||
|
|
2ed8d7f4df | ||
|
|
4091f55a4b | ||
|
|
45c6ba535c | ||
|
|
57a605d7cc | ||
|
|
fcfcc42baf | ||
|
|
c516504670 | ||
|
|
c479b3b7b7 | ||
|
|
269ac93b1b | ||
|
|
15d4e6ab79 | ||
|
|
77495bb7e1 | ||
|
|
c183b699bc | ||
|
|
3d4a3e7050 | ||
|
|
c14095472e | ||
|
|
1afc4b6779 | ||
|
|
41eb864595 | ||
|
|
0f60055086 | ||
|
|
9a8e5d7784 | ||
|
|
6985fca6ee | ||
|
|
04ae944c3c | ||
|
|
0c4e251ebe | ||
|
|
0faeb3f19e | ||
|
|
150736273e | ||
|
|
d5a98758fa | ||
|
|
cd3d5fd03a | ||
|
|
48a89b7705 | ||
|
|
ec350abf06 | ||
|
|
d56abd61ce | ||
|
|
2788ede42a | ||
|
|
1c953ed38c | ||
|
|
b2dc95bb18 | ||
|
|
797b5756cf | ||
|
|
bd4da55f0f | ||
|
|
47bf3df0ae | ||
|
|
ff0929e6e3 | ||
|
|
9b925abaff | ||
|
|
bf50f2fe7f | ||
|
|
85630d55a6 | ||
|
|
2e8c4eb8f3 |
643
.github/workflows/ci.yml
vendored
Normal file
643
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,643 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- feature/**
|
||||||
|
|
||||||
|
env:
|
||||||
|
UBSAN_OPTIONS: print_stacktrace=1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
posix:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- toolset: gcc-4.8
|
||||||
|
cxxstd: "11"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: g++-4.8
|
||||||
|
- toolset: gcc-5
|
||||||
|
cxxstd: "11,14,1z"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: g++-5
|
||||||
|
- toolset: gcc-6
|
||||||
|
cxxstd: "11,14,1z"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: g++-6
|
||||||
|
- toolset: gcc-7
|
||||||
|
cxxstd: "11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-7
|
||||||
|
- toolset: gcc-8
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-8
|
||||||
|
- toolset: gcc-9
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
- toolset: gcc-10
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-10
|
||||||
|
- toolset: gcc-11
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
- 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
|
||||||
|
compiler: clang++-3.9
|
||||||
|
cxxstd: "11,14"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: clang-3.9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-4.0
|
||||||
|
cxxstd: "11,14"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: clang-4.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-5.0
|
||||||
|
cxxstd: "11,14,1z"
|
||||||
|
os: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
install: clang-5.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-6.0
|
||||||
|
cxxstd: "11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-6.0
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-7
|
||||||
|
cxxstd: "11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-7
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-8
|
||||||
|
cxxstd: "11,14,17"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-8
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-9
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-9
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-10
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-10
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-11
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-11
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-12
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-12
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-13
|
||||||
|
cxxstd: "11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-13
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-14
|
||||||
|
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}}
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: ${{matrix.container}}
|
||||||
|
volumes:
|
||||||
|
- /node20217:/node20217:rw,rshared
|
||||||
|
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- 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
|
||||||
|
if: matrix.install
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||||
|
./bootstrap.sh
|
||||||
|
./b2 -d0 headers
|
||||||
|
|
||||||
|
- name: Create user-config.jam
|
||||||
|
if: matrix.compiler
|
||||||
|
run: |
|
||||||
|
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
STDLIB=${{matrix.stdlib}}
|
||||||
|
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release ${STDLIB:+stdlib=$STDLIB}
|
||||||
|
|
||||||
|
windows:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- toolset: msvc-14.0
|
||||||
|
cxxstd: "14,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2019
|
||||||
|
- toolset: msvc-14.2
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2019
|
||||||
|
- toolset: msvc-14.3
|
||||||
|
cxxstd: "14,17,20,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2022
|
||||||
|
- toolset: clang-win
|
||||||
|
cxxstd: "14,17,latest"
|
||||||
|
addrmd: 32,64
|
||||||
|
os: windows-2022
|
||||||
|
- toolset: gcc
|
||||||
|
cxxstd: "11,14,17,2a"
|
||||||
|
addrmd: 64
|
||||||
|
os: windows-2019
|
||||||
|
|
||||||
|
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%
|
||||||
|
cmd /c bootstrap
|
||||||
|
b2 -d0 headers
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release
|
||||||
|
|
||||||
|
posix-cmake-subdir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
- os: macos-13
|
||||||
|
- os: macos-14
|
||||||
|
- os: macos-15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $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
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/$LIBRARY/test/cmake_subdir_test
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake ..
|
||||||
|
cmake --build .
|
||||||
|
ctest --output-on-failure --no-tests=error
|
||||||
|
|
||||||
|
posix-cmake-install:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
- os: macos-13
|
||||||
|
- os: macos-14
|
||||||
|
- os: macos-15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target install
|
||||||
|
|
||||||
|
- name: Use the installed library
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||||
|
cmake --build .
|
||||||
|
ctest --output-on-failure --no-tests=error
|
||||||
|
|
||||||
|
posix-cmake-test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
- os: macos-13
|
||||||
|
- os: macos-14
|
||||||
|
- os: macos-15
|
||||||
|
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
if: matrix.install
|
||||||
|
run: sudo apt install ${{matrix.install}}
|
||||||
|
|
||||||
|
- name: Setup Boost
|
||||||
|
run: |
|
||||||
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||||
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||||
|
echo LIBRARY: $LIBRARY
|
||||||
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||||
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||||
|
echo GITHUB_REF: $GITHUB_REF
|
||||||
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||||
|
REF=${REF#refs/heads/}
|
||||||
|
echo REF: $REF
|
||||||
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||||
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||||
|
cd ..
|
||||||
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
cd boost-root
|
||||||
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||||
|
git submodule update --init tools/boostdep
|
||||||
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
cd ../boost-root
|
||||||
|
mkdir __build__ && cd __build__
|
||||||
|
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ..
|
||||||
|
|
||||||
|
- name: Build tests
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
cmake --build . --target tests
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cd ../boost-root/__build__
|
||||||
|
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
|
||||||
163
.travis.yml
Normal file
163
.travis.yml
Normal 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: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
||||||
|
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
34
CMakeLists.txt
Normal 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()
|
||||||
|
|
||||||
46
appveyor.yml
Normal file
46
appveyor.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Copyright 2016-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)
|
||||||
|
|
||||||
|
version: 1.0.{build}-{branch}
|
||||||
|
|
||||||
|
shallow_clone: true
|
||||||
|
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- /feature\/.*/
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
TOOLSET: msvc-14.0
|
||||||
|
ADDRMD: 32,64
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
TOOLSET: msvc-14.1
|
||||||
|
CXXSTD: 14,17,latest
|
||||||
|
ADDRMD: 32,64
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
|
TOOLSET: clang-win
|
||||||
|
CXXSTD: 14,17,latest
|
||||||
|
ADDRMD: 32,64
|
||||||
|
|
||||||
|
install:
|
||||||
|
- set BOOST_BRANCH=develop
|
||||||
|
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
|
||||||
|
- cd ..
|
||||||
|
- git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||||
|
- cd boost-root
|
||||||
|
- git submodule update --init tools/boostdep
|
||||||
|
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\lambda\
|
||||||
|
- python tools/boostdep/depinst/depinst.py lambda
|
||||||
|
- cmd /c bootstrap
|
||||||
|
- b2 -d0 headers
|
||||||
|
|
||||||
|
build: off
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
|
||||||
|
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
|
||||||
|
- b2 -j3 libs/lambda/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker
|
||||||
30
build.jam
Normal file
30
build.jam
Normal 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
|
||||||
|
;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
project boost/doc ;
|
project lambda/doc ;
|
||||||
import boostbook : boostbook ;
|
import boostbook : boostbook ;
|
||||||
|
|
||||||
# Are these really the correct images??
|
# Are these really the correct images??
|
||||||
@@ -10,3 +10,12 @@ boostbook lambda-doc : lambda.xml
|
|||||||
<format>pdf:<xsl:param>img.src.path=$(images)/
|
<format>pdf:<xsl:param>img.src.path=$(images)/
|
||||||
;
|
;
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
alias boostdoc
|
||||||
|
: lambda.xml
|
||||||
|
:
|
||||||
|
:
|
||||||
|
: ;
|
||||||
|
explicit boostdoc ;
|
||||||
|
alias boostrelease ;
|
||||||
|
explicit boostrelease ;
|
||||||
|
|||||||
@@ -3281,7 +3281,7 @@ was dropped.
|
|||||||
<abbrev>SGI02</abbrev>
|
<abbrev>SGI02</abbrev>
|
||||||
<title>The SGI Standard Template Library</title>
|
<title>The SGI Standard Template Library</title>
|
||||||
<pubdate>2002</pubdate>
|
<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>
|
</biblioentry>
|
||||||
|
|
||||||
@@ -3435,7 +3435,7 @@ was dropped.
|
|||||||
<firstname>Brian</firstname>
|
<firstname>Brian</firstname>
|
||||||
<surname>McNamara</surname>
|
<surname>McNamara</surname>
|
||||||
</author>
|
</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>
|
</bibliomisc>
|
||||||
<pubdate>2002</pubdate>
|
<pubdate>2002</pubdate>
|
||||||
</biblioentry>
|
</biblioentry>
|
||||||
|
|||||||
@@ -3286,7 +3286,7 @@ was dropped.
|
|||||||
<abbrev>SGI02</abbrev>
|
<abbrev>SGI02</abbrev>
|
||||||
<title>The SGI Standard Template Library</title>
|
<title>The SGI Standard Template Library</title>
|
||||||
<pubdate>2002</pubdate>
|
<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>
|
</biblioentry>
|
||||||
|
|
||||||
@@ -3440,7 +3440,7 @@ was dropped.
|
|||||||
<firstname>Brian</firstname>
|
<firstname>Brian</firstname>
|
||||||
<surname>McNamara</surname>
|
<surname>McNamara</surname>
|
||||||
</author>
|
</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>
|
</bibliomisc>
|
||||||
<pubdate>2002</pubdate>
|
<pubdate>2002</pubdate>
|
||||||
</biblioentry>
|
</biblioentry>
|
||||||
|
|||||||
@@ -684,6 +684,8 @@ struct rotate_copy {
|
|||||||
|
|
||||||
// random_shuffle ---------------------------------
|
// random_shuffle ---------------------------------
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_CXX98_RANDOM_SHUFFLE
|
||||||
|
|
||||||
struct random_shuffle {
|
struct random_shuffle {
|
||||||
|
|
||||||
template <class Args>
|
template <class Args>
|
||||||
@@ -703,6 +705,7 @@ struct random_shuffle {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// partition ---------------------------------
|
// partition ---------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,11 @@
|
|||||||
|
|
||||||
#include "boost/lambda/core.hpp"
|
#include "boost/lambda/core.hpp"
|
||||||
|
|
||||||
|
// Required for std::is_assignable to work on the result of bind()
|
||||||
|
#include "boost/lambda/detail/operator_actions.hpp"
|
||||||
|
#include "boost/lambda/detail/operator_lambda_func_base.hpp"
|
||||||
|
#include "boost/lambda/detail/operator_return_type_traits.hpp"
|
||||||
|
|
||||||
#include "boost/lambda/detail/bind_functions.hpp"
|
#include "boost/lambda/detail/bind_functions.hpp"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
URL: http://spirit.sourceforge.net/
|
URL: http://spirit.sourceforge.net/
|
||||||
|
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#ifndef PHOENIX_CLOSURES_HPP
|
#ifndef BOOST_LAMBDA_CLOSURES_HPP
|
||||||
#define PHOENIX_CLOSURES_HPP
|
#define BOOST_LAMBDA_CLOSURES_HPP
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#include "boost/lambda/core.hpp"
|
#include "boost/lambda/core.hpp"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#ifndef BOOST_LAMBDA_CORE_HPP
|
#ifndef BOOST_LAMBDA_CORE_HPP
|
||||||
#define BOOST_LAMBDA_CORE_HPP
|
#define BOOST_LAMBDA_CORE_HPP
|
||||||
|
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
#include "boost/type_traits/transform_traits.hpp"
|
#include "boost/type_traits/transform_traits.hpp"
|
||||||
#include "boost/type_traits/cv_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::placeholder2_type free2 = boost::lambda::placeholder2_type();
|
||||||
boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
|
boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
|
||||||
|
|
||||||
boost::lambda::placeholder1_type& _1 = free1;
|
boost::lambda::placeholder1_type& BOOST_ATTRIBUTE_UNUSED _1 = free1;
|
||||||
boost::lambda::placeholder2_type& _2 = free2;
|
boost::lambda::placeholder2_type& BOOST_ATTRIBUTE_UNUSED _2 = free2;
|
||||||
boost::lambda::placeholder3_type& _3 = free3;
|
boost::lambda::placeholder3_type& BOOST_ATTRIBUTE_UNUSED _3 = free3;
|
||||||
// _1, _2, ... naming scheme by Peter Dimov
|
// _1, _2, ... naming scheme by Peter Dimov
|
||||||
} // unnamed
|
} // unnamed
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,6 @@
|
|||||||
# define BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
|
# define BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
|
||||||
# define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
|
# define BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
|
||||||
# endif
|
# 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__
|
# endif // __GNUC__
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ public:
|
|||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE)
|
#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_DECLTYPE)
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
struct result_of<boost::lambda::lambda_functor<T>()>
|
struct result_of<boost::lambda::lambda_functor<T>()>
|
||||||
|
|||||||
@@ -282,6 +282,11 @@ struct const_copy_argument<void> {
|
|||||||
typedef void type;
|
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
|
// Does the same as const_copy_argument, but passes references through as such
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|||||||
@@ -12,7 +12,13 @@
|
|||||||
#define BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
|
#define BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
|
||||||
|
|
||||||
#include "boost/lambda/detail/is_instance_of.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/indirect_reference.hpp"
|
||||||
#include "boost/detail/container_fwd.hpp"
|
#include "boost/detail/container_fwd.hpp"
|
||||||
@@ -536,36 +542,6 @@ struct return_type_2<bitwise_action<Act>, A, B>
|
|||||||
|
|
||||||
namespace detail {
|
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 {
|
template <class T> struct get_ostream_type {
|
||||||
typedef std::basic_ostream<typename T::char_type,
|
typedef std::basic_ostream<typename T::char_type,
|
||||||
@@ -602,7 +578,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // end detail
|
} // end detail
|
||||||
|
|
||||||
|
|||||||
@@ -161,23 +161,6 @@ namespace detail {
|
|||||||
|
|
||||||
// Note that the overloading is const vs. non-const first argument
|
// 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 {
|
template<class T> struct convert_ostream_to_ref_others_to_c_plain_by_default {
|
||||||
typedef typename detail::IF<
|
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
|
typename const_copy_argument <T>::type
|
||||||
>::RET type;
|
>::RET type;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
} // detail
|
} // detail
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,6 @@
|
|||||||
namespace boost {
|
namespace boost {
|
||||||
namespace lambda {
|
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
|
// Much of the type deduction code for standard arithmetic types
|
||||||
// from Gary Powell
|
// from Gary Powell
|
||||||
|
|
||||||
@@ -77,8 +73,7 @@ template <class Act, class A> struct return_type_1_prot {
|
|||||||
public:
|
public:
|
||||||
typedef typename
|
typedef typename
|
||||||
detail::IF<
|
detail::IF<
|
||||||
// is_protectable<Act>::value && is_lambda_functor<A>::value,
|
is_protectable<Act>::value && is_lambda_functor<A>::value,
|
||||||
ice_and<is_protectable<Act>::value, is_lambda_functor<A>::value>::value,
|
|
||||||
lambda_functor<
|
lambda_functor<
|
||||||
lambda_functor_base<
|
lambda_functor_base<
|
||||||
Act,
|
Act,
|
||||||
@@ -112,9 +107,7 @@ namespace detail {
|
|||||||
// add const to rvalues, so that all rvalues are stored as const in
|
// add const to rvalues, so that all rvalues are stored as const in
|
||||||
// the args tuple
|
// the args tuple
|
||||||
typedef typename detail::IF_type<
|
typedef typename detail::IF_type<
|
||||||
// boost::is_reference<T>::value && !boost::is_const<non_ref_T>::value,
|
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,
|
|
||||||
detail::identity_mapping<T>,
|
detail::identity_mapping<T>,
|
||||||
const_copy_argument<non_ref_T> // handles funtion and array
|
const_copy_argument<non_ref_T> // handles funtion and array
|
||||||
>::type type; // types correctly
|
>::type type; // types correctly
|
||||||
@@ -148,11 +141,8 @@ template <class Act, class A, class B> struct return_type_2_prot {
|
|||||||
|
|
||||||
typedef typename
|
typedef typename
|
||||||
detail::IF<
|
detail::IF<
|
||||||
// is_protectable<Act>::value &&
|
is_protectable<Act>::value &&
|
||||||
// (is_lambda_functor<A>::value || is_lambda_functor<B>::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,
|
|
||||||
lambda_functor<
|
lambda_functor<
|
||||||
lambda_functor_base<
|
lambda_functor_base<
|
||||||
Act,
|
Act,
|
||||||
@@ -187,11 +177,8 @@ struct return_type_2_comma
|
|||||||
|
|
||||||
typedef typename
|
typedef typename
|
||||||
detail::IF<
|
detail::IF<
|
||||||
// is_protectable<other_action<comma_action> >::value && // it is protectable
|
is_protectable<other_action<comma_action> >::value && // it is protectable
|
||||||
// (is_lambda_functor<A>::value || is_lambda_functor<B>::value),
|
(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,
|
|
||||||
lambda_functor<
|
lambda_functor<
|
||||||
lambda_functor_base<
|
lambda_functor_base<
|
||||||
other_action<comma_action>,
|
other_action<comma_action>,
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef BOOST_LAMBDA_SUPRESS_UNUSED_HPP
|
#ifndef BOOST_LAMBDA_SUPPRESS_UNUSED_HPP
|
||||||
#define BOOST_LAMBDA_SUPRESS_UNUSED_HPP
|
#define BOOST_LAMBDA_SUPPRESS_UNUSED_HPP
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace lambda {
|
namespace lambda {
|
||||||
|
|||||||
@@ -24,11 +24,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "boost/lambda/detail/operators.hpp"
|
#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"
|
#include "boost/lambda/detail/member_ptr.hpp"
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
16
meta/libraries.json
Normal file
16
meta/libraries.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"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>"
|
||||||
|
],
|
||||||
|
"cxxstd": "03"
|
||||||
|
}
|
||||||
11
test/CMakeLists.txt
Normal file
11
test/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright 2018, 2019 Peter Dimov
|
||||||
|
# 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
|
||||||
|
|
||||||
|
include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
|
||||||
|
|
||||||
|
if(HAVE_BOOST_TEST)
|
||||||
|
|
||||||
|
boost_test_jamfile(FILE Jamfile LINK_LIBRARIES Boost::lambda Boost::core Boost::any Boost::function Boost::smart_ptr)
|
||||||
|
|
||||||
|
endif()
|
||||||
45
test/Jamfile
45
test/Jamfile
@@ -1,6 +1,6 @@
|
|||||||
# 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
|
||||||
@@ -10,26 +10,27 @@
|
|||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
project
|
project : requirements <library>/boost/lambda//boost_lambda ;
|
||||||
: requirements <toolset>msvc:<asynch-exceptions>on
|
|
||||||
;
|
|
||||||
|
|
||||||
test-suite lambda
|
run algorithm_test.cpp ;
|
||||||
: [ run algorithm_test.cpp ]
|
run bind_tests_advanced.cpp : : : <library>/boost/any//boost_any ;
|
||||||
[ run bind_tests_simple.cpp ]
|
run bind_tests_simple.cpp ;
|
||||||
[ run bind_tests_advanced.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 ]
|
run cast_test.cpp ;
|
||||||
[ run cast_test.cpp : : : : lambda_cast_test ]
|
run constructor_tests.cpp ;
|
||||||
[ run constructor_tests.cpp ]
|
run control_structures.cpp ;
|
||||||
[ run control_structures.cpp ]
|
run exception_test.cpp
|
||||||
[ run exception_test.cpp ]
|
: : : <toolset>msvc-14.0,<variant>release:<build>no # crash with 8 catch blocks
|
||||||
[ run extending_rt_traits.cpp ]
|
|
||||||
[ run is_instance_of_test.cpp ]
|
|
||||||
[ run member_pointer_test.cpp ]
|
|
||||||
[ run operator_tests_simple.cpp ]
|
|
||||||
[ run phoenix_control_structures.cpp ]
|
|
||||||
[ run switch_construct.cpp ]
|
|
||||||
[ run result_of_tests.cpp ]
|
|
||||||
[ run ret_test.cpp ]
|
|
||||||
;
|
;
|
||||||
|
run extending_rt_traits.cpp ;
|
||||||
|
run is_instance_of_test.cpp ;
|
||||||
|
run istreambuf_test.cpp ;
|
||||||
|
run member_pointer_test.cpp ;
|
||||||
|
run operator_tests_simple.cpp ;
|
||||||
|
run phoenix_control_structures.cpp ;
|
||||||
|
run result_of_tests.cpp ;
|
||||||
|
run ret_test.cpp ;
|
||||||
|
run rvalue_test.cpp ;
|
||||||
|
run switch_construct.cpp ;
|
||||||
|
link issue24_test.cpp ;
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
// test using BLL and boost::function
|
// test using BLL and boost::function
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
#include "boost/lambda/bind.hpp"
|
#include "boost/lambda/bind.hpp"
|
||||||
@@ -46,15 +47,9 @@ void test_foreach() {
|
|||||||
|
|
||||||
// More tests needed (for all algorithms)
|
// More tests needed (for all algorithms)
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
test_foreach();
|
test_foreach();
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
#include "boost/lambda/bind.hpp"
|
#include "boost/lambda/bind.hpp"
|
||||||
@@ -121,11 +122,37 @@ void test_unlambda() {
|
|||||||
|
|
||||||
BOOST_CHECK(call_with_101(_1 + 1) == 102);
|
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);
|
BOOST_CHECK(call_with_100(bl::bind(std_functor(std::bind1st(std::plus<int>(), 1)), _1)) == 101);
|
||||||
|
|
||||||
|
#elif BOOST_CXX_VERSION > 201703L
|
||||||
|
|
||||||
|
// In C++20, standard functors no longer have ::result_type
|
||||||
|
BOOST_CHECK(call_with_100(bl::bind(std::bind(std::plus<int>(), 1, std::placeholders::_1), _1)) == 101);
|
||||||
|
|
||||||
|
#elif defined(BOOST_MSVC) && BOOST_MSVC < 1900
|
||||||
|
|
||||||
|
// Mysterious failures under msvc-12.0 and below
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
BOOST_CHECK(call_with_100(bl::bind(std_functor(std::bind(std::plus<int>(), 1, std::placeholders::_1)), _1)) == 101);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BOOST_CXX_VERSION <= 201703L
|
||||||
|
|
||||||
// std_functor insturcts LL that the functor defines a result_type typedef
|
// std_functor insturcts LL that the functor defines a result_type typedef
|
||||||
// rather than a sig template.
|
// rather than a sig template.
|
||||||
bl::bind(std_functor(std::plus<int>()), _1, _2)(i, i);
|
bl::bind(std_functor(std::plus<int>()), _1, _2)(i, i);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
// In C++20, standard functors no longer have ::result_type
|
||||||
|
bl::bind(std::plus<int>(), _1, _2)(i, i);
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -405,7 +432,7 @@ void test_abstract()
|
|||||||
BOOST_CHECK(bind(&base::foo, *_1)(&b) == 1);
|
BOOST_CHECK(bind(&base::foo, *_1)(&b) == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
test_nested_binds();
|
test_nested_binds();
|
||||||
test_unlambda();
|
test_unlambda();
|
||||||
@@ -416,5 +443,5 @@ int test_main(int, char *[]) {
|
|||||||
test_break_const();
|
test_break_const();
|
||||||
test_sig();
|
test_sig();
|
||||||
test_abstract();
|
test_abstract();
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/bind.hpp"
|
#include "boost/lambda/bind.hpp"
|
||||||
|
|
||||||
@@ -97,7 +98,7 @@ void test_data_members()
|
|||||||
BOOST_CHECK(b.i == 1);
|
BOOST_CHECK(b.i == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
int i = 1; int j = 2; int k = 3;
|
int i = 1; int j = 2; int k = 3;
|
||||||
int result;
|
int result;
|
||||||
@@ -183,5 +184,5 @@ int test_main(int, char *[]) {
|
|||||||
test_member_functions();
|
test_member_functions();
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/bind.hpp"
|
#include "boost/lambda/bind.hpp"
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ void test_member_functions()
|
|||||||
// bind(&A::add, a, _1);
|
// bind(&A::add, a, _1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
int i = 1; int j = 2; int k = 3;
|
int i = 1; int j = 2; int k = 3;
|
||||||
int result;
|
int result;
|
||||||
@@ -144,5 +145,5 @@ int test_main(int, char *[]) {
|
|||||||
test_member_functions();
|
test_member_functions();
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
// test using BLL and boost::function
|
// test using BLL and boost::function
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
|
|
||||||
@@ -54,15 +55,9 @@ void test_function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
test_function();
|
test_function();
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
@@ -100,8 +101,8 @@ void do_test() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
do_test();
|
do_test();
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
18
test/cmake_install_test/CMakeLists.txt
Normal file
18
test/cmake_install_test/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Copyright 2018, 2019 Peter Dimov
|
||||||
|
# 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
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.5...3.16)
|
||||||
|
|
||||||
|
project(cmake_install_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
find_package(boost_lambda REQUIRED)
|
||||||
|
find_package(boost_core REQUIRED)
|
||||||
|
|
||||||
|
add_executable(quick ../quick.cpp)
|
||||||
|
target_link_libraries(quick Boost::lambda Boost::core)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(quick quick)
|
||||||
|
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
21
test/cmake_subdir_test/CMakeLists.txt
Normal file
21
test/cmake_subdir_test/CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2018, 2019, 2021 Peter Dimov
|
||||||
|
# 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
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.5...3.16)
|
||||||
|
|
||||||
|
project(cmake_subdir_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
set(BOOST_INCLUDE_LIBRARIES lambda)
|
||||||
|
|
||||||
|
add_subdirectory(../../../../ deps/boost)
|
||||||
|
|
||||||
|
# --target check
|
||||||
|
|
||||||
|
add_executable(quick ../quick.cpp)
|
||||||
|
target_link_libraries(quick Boost::lambda Boost::core)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(quick quick)
|
||||||
|
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
@@ -252,7 +253,7 @@ void delayed_construction()
|
|||||||
bl::bind(constructor<std::pair<int, int> >(), _1, _2) );
|
bl::bind(constructor<std::pair<int, int> >(), _1, _2) );
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
constructor_all_lengths();
|
constructor_all_lengths();
|
||||||
new_ptr_all_lengths();
|
new_ptr_all_lengths();
|
||||||
@@ -261,5 +262,5 @@ int test_main(int, char *[]) {
|
|||||||
test_news_and_deletes();
|
test_news_and_deletes();
|
||||||
test_array_new_and_delete();
|
test_array_new_and_delete();
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
#include "boost/lambda/if.hpp"
|
#include "boost/lambda/if.hpp"
|
||||||
@@ -115,9 +116,9 @@ void simple_ifs () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int test_main(int, char *[])
|
int main()
|
||||||
{
|
{
|
||||||
simple_loops();
|
simple_loops();
|
||||||
simple_ifs();
|
simple_ifs();
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
|
|
||||||
@@ -595,7 +596,7 @@ void return_type_matching() {
|
|||||||
BOOST_CHECK(a == 'b');
|
BOOST_CHECK(a == 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -613,9 +614,5 @@ int test_main(int, char *[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/bind.hpp"
|
#include "boost/lambda/bind.hpp"
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
@@ -381,14 +382,8 @@ void test_binary_operators() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
test_unary_operators();
|
test_unary_operators();
|
||||||
test_binary_operators();
|
test_binary_operators();
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
|
|
||||||
#include "boost/lambda/detail/is_instance_of.hpp"
|
#include "boost/lambda/detail/is_instance_of.hpp"
|
||||||
@@ -45,7 +46,7 @@ template <bool b> class X {};
|
|||||||
X<boost::lambda::is_instance_of_2<int, A2>::value> x;
|
X<boost::lambda::is_instance_of_2<int, A2>::value> x;
|
||||||
|
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
using boost::lambda::is_instance_of_1;
|
using boost::lambda::is_instance_of_1;
|
||||||
using boost::lambda::is_instance_of_2;
|
using boost::lambda::is_instance_of_2;
|
||||||
@@ -73,7 +74,6 @@ BOOST_CHECK((is_instance_of_4<A4<int, float, char, double>, A4>::value == true))
|
|||||||
BOOST_CHECK((is_instance_of_4<int, A4>::value == false));
|
BOOST_CHECK((is_instance_of_4<int, A4>::value == false));
|
||||||
BOOST_CHECK((is_instance_of_4<C4, A4>::value == false));
|
BOOST_CHECK((is_instance_of_4<C4, A4>::value == false));
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
26
test/issue24_test.cpp
Normal file
26
test/issue24_test.cpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// Copyright 2021 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/lambda/bind.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
|
||||||
|
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
BOOST_PRAGMA_MESSAGE( "Skipping test because BOOST_NO_CXX11_HDR_FUNCTIONAL is defined" )
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
void func()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
std::function<void()>( boost::lambda::bind( func ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/lambda/lambda.hpp>
|
#include <boost/lambda/lambda.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
@@ -182,11 +183,10 @@ void test_overloaded_pointer_to_member()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
pointer_to_data_member_tests();
|
pointer_to_data_member_tests();
|
||||||
pointer_to_member_function_tests();
|
pointer_to_member_function_tests();
|
||||||
test_overloaded_pointer_to_member();
|
test_overloaded_pointer_to_member();
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
|
|
||||||
@@ -408,7 +409,7 @@ void pointer_arithmetic() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
arithmetic_operators();
|
arithmetic_operators();
|
||||||
bitwise_operators();
|
bitwise_operators();
|
||||||
@@ -421,11 +422,5 @@ int test_main(int, char *[]) {
|
|||||||
comma();
|
comma();
|
||||||
pointer_arithmetic();
|
pointer_arithmetic();
|
||||||
cout_tests();
|
cout_tests();
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
#include "boost/lambda/if.hpp"
|
#include "boost/lambda/if.hpp"
|
||||||
@@ -36,7 +37,7 @@ using namespace std;
|
|||||||
// If-else, while, do-while, for statements
|
// If-else, while, do-while, for statements
|
||||||
|
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
|
|
||||||
vector<int> v;
|
vector<int> v;
|
||||||
v.clear();
|
v.clear();
|
||||||
@@ -143,6 +144,5 @@ int test_main(int, char *[]) {
|
|||||||
|
|
||||||
v = t;
|
v = t;
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
15
test/quick.cpp
Normal file
15
test/quick.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2021 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/lambda/lambda.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
using namespace boost::lambda;
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( (_1 + _2)(1, 2), 3 );
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
@@ -11,7 +11,9 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include <boost/lambda/bind.hpp>
|
#include <boost/lambda/bind.hpp>
|
||||||
#include <boost/lambda/lambda.hpp>
|
#include <boost/lambda/lambda.hpp>
|
||||||
#include <boost/mpl/assert.hpp>
|
#include <boost/mpl/assert.hpp>
|
||||||
@@ -252,7 +254,7 @@ typename boost::result_of<F(A, B, C)>::type apply3(F f, A a, B b, C c) {
|
|||||||
|
|
||||||
using namespace boost::lambda;
|
using namespace boost::lambda;
|
||||||
|
|
||||||
int test_main(int, char *[]) {
|
int main() {
|
||||||
BOOST_CHECK(boost::lambda::bind(with_result_type())() == 0);
|
BOOST_CHECK(boost::lambda::bind(with_result_type())() == 0);
|
||||||
BOOST_CHECK(boost::lambda::bind(with_result_type(), 1)() == 1);
|
BOOST_CHECK(boost::lambda::bind(with_result_type(), 1)() == 1);
|
||||||
BOOST_CHECK(boost::lambda::bind(with_result_type(), 1, 2)() == 2);
|
BOOST_CHECK(boost::lambda::bind(with_result_type(), 1, 2)() == 2);
|
||||||
@@ -300,7 +302,8 @@ int test_main(int, char *[]) {
|
|||||||
|
|
||||||
// Check using result_of with lambda functors
|
// 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);
|
// returns local address and leads to undefined behavior
|
||||||
|
//~ BOOST_CHECK(apply1<int>(_1, one) == 1);
|
||||||
BOOST_CHECK(apply1<int&>(_1, one) == 1);
|
BOOST_CHECK(apply1<int&>(_1, one) == 1);
|
||||||
BOOST_CHECK(apply1<const int&>(_1, one) == 1);
|
BOOST_CHECK(apply1<const int&>(_1, one) == 1);
|
||||||
BOOST_CHECK((apply2<int, int>(_1 + _2, one, two) == 3));
|
BOOST_CHECK((apply2<int, int>(_1 + _2, one, two) == 3));
|
||||||
@@ -310,5 +313,5 @@ int test_main(int, char *[]) {
|
|||||||
BOOST_CHECK((apply3<int&, int&, int&>(_1 + _2 + _3, one, two, three) == 6));
|
BOOST_CHECK((apply3<int&, int&, int&>(_1 + _2 + _3, one, two, three) == 6));
|
||||||
BOOST_CHECK((apply3<const int&, const int&, const int&>(_1 + _2 + _3, one, two, three) == 6));
|
BOOST_CHECK((apply3<const int&, const int&, const int&>(_1 + _2 + _3, one, two, three) == 6));
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
//
|
//
|
||||||
// For more information, see www.boost.org
|
// For more information, see www.boost.org
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
#include <boost/lambda/lambda.hpp>
|
#include <boost/lambda/lambda.hpp>
|
||||||
|
|
||||||
@@ -44,10 +45,10 @@ add_result operator+(addable, addable) {
|
|||||||
return add_result(7);
|
return add_result(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char*[]) {
|
int main() {
|
||||||
addable test;
|
addable test;
|
||||||
test_ret(add_result(7), boost::lambda::ret<add_result>(boost::lambda::_1 + test), test);
|
test_ret(add_result(7), boost::lambda::ret<add_result>(boost::lambda::_1 + test), test);
|
||||||
test_ret(8.0, boost::lambda::ret<double>(boost::lambda::constant(7) + 1));
|
test_ret(8.0, boost::lambda::ret<double>(boost::lambda::constant(7) + 1));
|
||||||
|
|
||||||
return 0;
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
// http://www.boost.org/LICENSE_1_0.txt
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/lambda/lambda.hpp>
|
#include <boost/lambda/lambda.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#include <boost/test/minimal.hpp> // see "Header Implementation Option"
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#define BOOST_CHECK BOOST_TEST
|
||||||
|
|
||||||
|
|
||||||
#include "boost/lambda/lambda.hpp"
|
#include "boost/lambda/lambda.hpp"
|
||||||
@@ -379,14 +380,13 @@ void test_empty_cases() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int test_main(int, char* []) {
|
int main() {
|
||||||
|
|
||||||
do_switch_no_defaults_tests();
|
do_switch_no_defaults_tests();
|
||||||
do_switch_yes_defaults_tests();
|
do_switch_yes_defaults_tests();
|
||||||
|
|
||||||
test_empty_cases();
|
test_empty_cases();
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return boost::report_errors();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user