mirror of
https://github.com/boostorg/lambda2.git
synced 2026-01-20 16:42:16 +00:00
Compare commits
51 Commits
feature/op
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f60f1d7f9f | ||
|
|
7b49621c6c | ||
|
|
a87d775e10 | ||
|
|
585671d15d | ||
|
|
dddfec6085 | ||
|
|
a13c743c4b | ||
|
|
865eb98c9c | ||
|
|
8466c546e5 | ||
|
|
6ebe42d4ac | ||
|
|
cb2e51eb84 | ||
|
|
f1d863c6b2 | ||
|
|
3fb266bf57 | ||
|
|
3d7778f2a9 | ||
|
|
97f43720a1 | ||
|
|
3a982bf019 | ||
|
|
a03806e4ec | ||
|
|
53bbeac521 | ||
|
|
ad47d9ed4f | ||
|
|
d1fa581326 | ||
|
|
19d484e707 | ||
|
|
a50009a44f | ||
|
|
4118a318ca | ||
|
|
94a56766bb | ||
|
|
863cdf2e96 | ||
|
|
7958b78d45 | ||
|
|
a17ffc25d3 | ||
|
|
2c8de60398 | ||
|
|
62815a69bf | ||
|
|
247f6b7b58 | ||
|
|
2935343723 | ||
|
|
8ac931161b | ||
|
|
3ba6ab955e | ||
|
|
4b68743cf0 | ||
|
|
3f43588316 | ||
|
|
20420e134f | ||
|
|
7824b74a27 | ||
|
|
d72468479f | ||
|
|
b55fdcb9fa | ||
|
|
fd1a3e4543 | ||
|
|
8c6c1166c4 | ||
|
|
c618d6902b | ||
|
|
ae42ebda76 | ||
|
|
3ccd5c251b | ||
|
|
132db3b09a | ||
|
|
253aef863f | ||
|
|
a593616a98 | ||
|
|
2ff3fef3d1 | ||
|
|
0572e42219 | ||
|
|
7c39436198 | ||
|
|
f8b3099259 | ||
|
|
a666ac4fb6 |
528
.github/workflows/ci.yml
vendored
528
.github/workflows/ci.yml
vendored
@@ -19,88 +19,210 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- toolset: gcc-5
|
- toolset: gcc-5
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-18.04
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
install: g++-5
|
install: g++-5
|
||||||
- toolset: gcc-6
|
- toolset: gcc-6
|
||||||
cxxstd: "03,11,14,1z"
|
cxxstd: "03,11,14,1z"
|
||||||
os: ubuntu-18.04
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
install: g++-6
|
install: g++-6
|
||||||
- toolset: gcc-7
|
- toolset: gcc-7
|
||||||
cxxstd: "03,11,14,17"
|
cxxstd: "03,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: "03,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: "03,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: "03,11,14,17,2a"
|
||||||
os: ubuntu-18.04
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-10
|
||||||
- toolset: gcc-11
|
- toolset: gcc-11
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
os: ubuntu-18.04
|
os: ubuntu-22.04
|
||||||
install: g++-11
|
- toolset: gcc-12
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: ubuntu-22.04
|
||||||
|
install: g++-12
|
||||||
|
- toolset: gcc-13
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-13
|
||||||
|
- toolset: gcc-14
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-14
|
||||||
|
- toolset: gcc-15
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
container: ubuntu:25.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: g++-15
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
compiler: clang++-3.9
|
compiler: clang++-3.9
|
||||||
cxxstd: "03,11,14"
|
cxxstd: "03,11,14"
|
||||||
os: ubuntu-18.04
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
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: "03,11,14"
|
||||||
os: ubuntu-18.04
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
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: "03,11,14,1z"
|
||||||
os: ubuntu-18.04
|
container: ubuntu:18.04
|
||||||
|
os: ubuntu-latest
|
||||||
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: "03,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: "03,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,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
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,2a"
|
cxxstd: "03,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: "03,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: "03,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: "03,11,14,17,2a"
|
||||||
os: ubuntu-20.04
|
container: ubuntu:20.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-12
|
||||||
- toolset: clang
|
- toolset: clang
|
||||||
cxxstd: "03,11,14,17,2a"
|
compiler: clang++-13
|
||||||
os: macos-10.15
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-13
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-14
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-14
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-15
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:22.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-15
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-16
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-16
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-17
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-17
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-18
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-18
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-19
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-19
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-20
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
container: ubuntu:24.04
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-20
|
||||||
|
- toolset: clang
|
||||||
|
compiler: clang++-21
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
container: ubuntu:25.10
|
||||||
|
os: ubuntu-latest
|
||||||
|
install: clang-21
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,2b"
|
||||||
|
os: macos-14
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
os: macos-15
|
||||||
|
- toolset: clang
|
||||||
|
cxxstd: "03,11,14,17,20,23,2c"
|
||||||
|
os: macos-26
|
||||||
|
|
||||||
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 install ${{matrix.install}}
|
run: sudo apt-get -y install ${{matrix.install}}
|
||||||
|
|
||||||
- name: Setup Boost
|
- name: Setup Boost
|
||||||
run: |
|
run: |
|
||||||
@@ -120,7 +242,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
|
||||||
|
|
||||||
@@ -139,23 +261,23 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- toolset: msvc-14.1
|
- 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-2016
|
os: windows-2022
|
||||||
- toolset: msvc-14.2
|
|
||||||
cxxstd: "14,17,latest"
|
|
||||||
addrmd: 32,64
|
|
||||||
os: windows-2019
|
|
||||||
- toolset: gcc
|
- toolset: gcc
|
||||||
cxxstd: "03,11,14,17,2a"
|
cxxstd: "03,11,14,17,2a"
|
||||||
addrmd: 64
|
addrmd: 64
|
||||||
os: windows-2019
|
os: windows-2022
|
||||||
|
|
||||||
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
|
||||||
@@ -183,4 +305,346 @@ jobs:
|
|||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
cd ../boost-root
|
cd ../boost-root
|
||||||
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release
|
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker
|
||||||
|
|
||||||
|
posix-cmake-subdir:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
- os: macos-14
|
||||||
|
- os: macos-15
|
||||||
|
- os: macos-26
|
||||||
|
|
||||||
|
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-14
|
||||||
|
- os: macos-15
|
||||||
|
- os: macos-26
|
||||||
|
|
||||||
|
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-14
|
||||||
|
- os: macos-15
|
||||||
|
- os: macos-26
|
||||||
|
|
||||||
|
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-2022
|
||||||
|
- os: windows-2025
|
||||||
|
|
||||||
|
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-2022
|
||||||
|
- os: windows-2025
|
||||||
|
|
||||||
|
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-2022
|
||||||
|
- os: windows-2025
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Generated by `boostdep --cmake lambda2`
|
# Generated by `boostdep --cmake lambda2`
|
||||||
# Copyright 2020 Peter Dimov
|
# Copyright 2020, 2021 Peter Dimov
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# https://www.boost.org/LICENSE_1_0.txt
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5...3.16)
|
cmake_minimum_required(VERSION 3.8...3.20)
|
||||||
|
|
||||||
project(boost_lambda2 VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
project(boost_lambda2 VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||||
|
|
||||||
@@ -12,9 +12,10 @@ add_library(Boost::lambda2 ALIAS boost_lambda2)
|
|||||||
|
|
||||||
target_include_directories(boost_lambda2 INTERFACE include)
|
target_include_directories(boost_lambda2 INTERFACE include)
|
||||||
|
|
||||||
|
target_compile_features(boost_lambda2 INTERFACE cxx_std_14)
|
||||||
|
|
||||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
16
build.jam
Normal file
16
build.jam
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Copyright 2023-2024 René Ferdinand Rivera Morell
|
||||||
|
# Copyright 2024 Peter Dimov
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
require-b2 5.2 ;
|
||||||
|
|
||||||
|
project /boost/lambda2 ;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ alias boost_lambda2 : : : : <include>include <library>$(boost_dependencies) ]
|
||||||
|
[ alias all : boost_lambda2 test ]
|
||||||
|
;
|
||||||
|
|
||||||
|
call-if : boost-library lambda2
|
||||||
|
;
|
||||||
@@ -9,7 +9,10 @@ Peter Dimov
|
|||||||
:toc: left
|
:toc: left
|
||||||
:toclevels: 4
|
:toclevels: 4
|
||||||
:idprefix:
|
:idprefix:
|
||||||
|
:listing-caption: Code Example
|
||||||
:docinfo: private-footer
|
:docinfo: private-footer
|
||||||
|
:source-highlighter: rouge
|
||||||
|
:source-language: c++
|
||||||
|
|
||||||
:leveloffset: +1
|
:leveloffset: +1
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ https://www.boost.org/LICENSE_1_0.txt
|
|||||||
|
|
||||||
* Added special cases in `operator<<` and `operator>>` when
|
* Added special cases in `operator<<` and `operator>>` when
|
||||||
the first argument is a stream, to allow `std::cout << _1`.
|
the first argument is a stream, to allow `std::cout << _1`.
|
||||||
|
* Added `operator\->*`.
|
||||||
|
* Added `first`, `second`.
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ namespace lambda2 {
|
|||||||
template<int I> struct lambda2_arg;
|
template<int I> struct lambda2_arg;
|
||||||
|
|
||||||
inline constexpr lambda2_arg<1> _1{};
|
inline constexpr lambda2_arg<1> _1{};
|
||||||
inline constexpr lambda2_arg<1> _2{};
|
inline constexpr lambda2_arg<2> _2{};
|
||||||
inline constexpr lambda2_arg<1> _3{};
|
inline constexpr lambda2_arg<3> _3{};
|
||||||
inline constexpr lambda2_arg<1> _4{};
|
inline constexpr lambda2_arg<4> _4{};
|
||||||
inline constexpr lambda2_arg<1> _5{};
|
inline constexpr lambda2_arg<5> _5{};
|
||||||
inline constexpr lambda2_arg<1> _6{};
|
inline constexpr lambda2_arg<6> _6{};
|
||||||
inline constexpr lambda2_arg<1> _7{};
|
inline constexpr lambda2_arg<7> _7{};
|
||||||
inline constexpr lambda2_arg<1> _8{};
|
inline constexpr lambda2_arg<8> _8{};
|
||||||
inline constexpr lambda2_arg<1> _9{};
|
inline constexpr lambda2_arg<9> _9{};
|
||||||
|
|
||||||
// arithmetic operators
|
// arithmetic operators
|
||||||
|
|
||||||
@@ -90,6 +90,11 @@ template<class A, class B> auto operator>>=( A && a, B && b );
|
|||||||
|
|
||||||
template<class A, class B> auto operator->*( A && a, B && b );
|
template<class A, class B> auto operator->*( A && a, B && b );
|
||||||
|
|
||||||
|
// projections
|
||||||
|
|
||||||
|
inline constexpr /unspecified/ first{};
|
||||||
|
inline constexpr /unspecified/ second{};
|
||||||
|
|
||||||
} // namespace lambda2
|
} // namespace lambda2
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
```
|
```
|
||||||
@@ -405,3 +410,26 @@ Returns: :: `std::bind( std::forward<B>(b), std::forward<A>(a) );`
|
|||||||
Notes: :: This operator is intended to be used with "projection" function
|
Notes: :: This operator is intended to be used with "projection" function
|
||||||
objects such as member pointers or member functions taking zero arguments,
|
objects such as member pointers or member functions taking zero arguments,
|
||||||
as in `_1\->*&X::m` or `_1\->*&X::f`.
|
as in `_1\->*&X::m` or `_1\->*&X::f`.
|
||||||
|
|
||||||
|
### Projections
|
||||||
|
|
||||||
|
```
|
||||||
|
inline constexpr /unspecified/ first{};
|
||||||
|
```
|
||||||
|
|
||||||
|
A function object such that `first(x)` returns `std::get<0>(x)`.
|
||||||
|
|
||||||
|
```
|
||||||
|
inline constexpr /unspecified/ second{};
|
||||||
|
```
|
||||||
|
|
||||||
|
A function object such that `second(x)` returns `std::get<1>(x)`.
|
||||||
|
|
||||||
|
.Using first and second to print out a map
|
||||||
|
```
|
||||||
|
void print( std::map<int, std::string> const & m )
|
||||||
|
{
|
||||||
|
using namespace boost::lambda2;
|
||||||
|
std::for_each( m.begin(), m.end(), std::cout << _1->*first << ": " << _1->*second << '\n' );
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// Same format as BOOST_VERSION:
|
// Same format as BOOST_VERSION:
|
||||||
// major * 100000 + minor * 100 + patch
|
// major * 100000 + minor * 100 + patch
|
||||||
#define BOOST_LAMBDA2_VERSION 107800
|
#define BOOST_LAMBDA2_VERSION 109100
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@@ -32,6 +32,14 @@ struct subscript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<int I> struct get
|
||||||
|
{
|
||||||
|
template<class T> decltype(auto) operator()( T&& t ) const
|
||||||
|
{
|
||||||
|
return std::get<I>( std::forward<T>(t) );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace lambda2_detail
|
} // namespace lambda2_detail
|
||||||
|
|
||||||
// placeholders
|
// placeholders
|
||||||
@@ -65,6 +73,11 @@ BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<7> _7{};
|
|||||||
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<8> _8{};
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<8> _8{};
|
||||||
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<9> _9{};
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_arg<9> _9{};
|
||||||
|
|
||||||
|
// first, second
|
||||||
|
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_detail::get<0> first{};
|
||||||
|
BOOST_LAMBDA2_INLINE_VAR constexpr lambda2_detail::get<1> second{};
|
||||||
|
|
||||||
#undef BOOST_LAMBDA2_INLINE_VAR
|
#undef BOOST_LAMBDA2_INLINE_VAR
|
||||||
|
|
||||||
} // namespace lambda2
|
} // namespace lambda2
|
||||||
|
|||||||
@@ -10,5 +10,6 @@
|
|||||||
"description": "A C++14 lambda library.",
|
"description": "A C++14 lambda library.",
|
||||||
"category": [
|
"category": [
|
||||||
"Function-objects"
|
"Function-objects"
|
||||||
]
|
],
|
||||||
|
"cxxstd": "14"
|
||||||
}
|
}
|
||||||
|
|||||||
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::lambda2 Boost::core)
|
||||||
|
|
||||||
|
endif()
|
||||||
10
test/Jamfile
10
test/Jamfile
@@ -2,10 +2,15 @@
|
|||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# https://www.boost.org/LICENSE_1_0.txt
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
import-search /boost/config/checks ;
|
||||||
|
|
||||||
import testing ;
|
import testing ;
|
||||||
import ../../config/checks/config : requires ;
|
import config : requires ;
|
||||||
|
|
||||||
project : requirements
|
project : requirements
|
||||||
|
<library>/boost/lambda2//boost_lambda2
|
||||||
|
<library>/boost/config//boost_config
|
||||||
|
<library>/boost/core//boost_core
|
||||||
|
|
||||||
<warnings>extra
|
<warnings>extra
|
||||||
|
|
||||||
@@ -13,7 +18,8 @@ project : requirements
|
|||||||
|
|
||||||
<toolset>msvc:<warnings-as-errors>on
|
<toolset>msvc:<warnings-as-errors>on
|
||||||
<toolset>clang:<warnings-as-errors>on
|
<toolset>clang:<warnings-as-errors>on
|
||||||
<toolset>gcc:<warnings-as-errors>on ;
|
<toolset>gcc:<warnings-as-errors>on
|
||||||
|
;
|
||||||
|
|
||||||
run quick.cpp ;
|
run quick.cpp ;
|
||||||
run lambda2_test.cpp ;
|
run lambda2_test.cpp ;
|
||||||
|
|||||||
17
test/cmake_install_test/CMakeLists.txt
Normal file
17
test/cmake_install_test/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# 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_lambda2 REQUIRED)
|
||||||
|
|
||||||
|
add_executable(quick ../quick.cpp)
|
||||||
|
target_link_libraries(quick Boost::lambda2)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(quick quick)
|
||||||
|
|
||||||
|
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
17
test/cmake_subdir_test/CMakeLists.txt
Normal file
17
test/cmake_subdir_test/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# 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_subdir_test LANGUAGES CXX)
|
||||||
|
|
||||||
|
add_subdirectory(../.. boostorg/lambda2)
|
||||||
|
|
||||||
|
add_executable(quick ../quick.cpp)
|
||||||
|
target_link_libraries(quick Boost::lambda2)
|
||||||
|
|
||||||
|
enable_testing()
|
||||||
|
add_test(quick quick)
|
||||||
|
|
||||||
|
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||||
@@ -63,6 +63,16 @@ int main()
|
|||||||
|
|
||||||
BOOST_TEST_EQ( (_1->*&std::pair<int, int>::first)( x ), 1 );
|
BOOST_TEST_EQ( (_1->*&std::pair<int, int>::first)( x ), 1 );
|
||||||
BOOST_TEST_EQ( (_1->*&std::pair<int, int>::second)( x ), 2 );
|
BOOST_TEST_EQ( (_1->*&std::pair<int, int>::second)( x ), 2 );
|
||||||
|
|
||||||
|
#if defined(_LIBCPP_VERSION)
|
||||||
|
|
||||||
|
// https://bugs.llvm.org/show_bug.cgi?id=51753
|
||||||
|
using std::placeholders::_1;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( (_1->*first)( x ), 1 );
|
||||||
|
BOOST_TEST_EQ( (_1->*second)( x ), 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
// Copyright 2020 Peter Dimov
|
// Copyright 2020, 2022 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/lambda2.hpp>
|
#include <boost/lambda2.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
using namespace boost::lambda2;
|
using namespace boost::lambda2;
|
||||||
|
return (_1 + _2 * _3)( 1, 2, 3) == 1 + 2 * 3? 0: 1;
|
||||||
BOOST_TEST_EQ( (_1 + _2 * _3)( 1, 2, 3), 1 + 2 * 3 );
|
|
||||||
|
|
||||||
return boost::report_errors();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user