Compare commits

...

52 Commits

Author SHA1 Message Date
Peter Dimov 7481e429b0 Merge branch 'develop' 2026-02-19 10:17:32 +02:00
Peter Dimov c471a8e73a Split timing out GCC 15 job 2026-02-08 14:34:57 +02:00
Peter Dimov 9fb0dd1f5e Merge pull request #162 from Lastique/feature/remove_static_assert
Remove dependencies on Boost.StaticAssert
2026-02-07 14:41:31 +02:00
Peter Dimov 7b53187c2b Merge branch 'develop' 2026-02-07 14:40:30 +02:00
Peter Dimov cd1ea88867 Fix typo in test/Jamfile.v2 2026-02-07 03:25:31 +02:00
Peter Dimov ea9200416a Disable find_end.cpp, find_first_of.cpp under CMake, as they require /bigobj 2026-02-07 02:13:57 +02:00
Peter Dimov 23e09c1b06 Disable ticket_6742_... on macOS; libc++ wants iterators to be assignable and transform_iterator<phoenix::actor<...>> is not 2026-02-07 02:10:36 +02:00
Peter Dimov a680ca3e85 Exclude clang-cl from msvc workaround 2026-02-06 22:51:39 +02:00
Peter Dimov 0d565eac10 Update LINK_LIBRARIES in test/CMakeLists.txt 2026-02-06 22:45:11 +02:00
Peter Dimov 9c94196fe4 Add test/cmake_subdir_test 2026-02-06 21:38:24 +02:00
Peter Dimov 55ded212a8 Add test/cmake_install_test 2026-02-06 21:38:09 +02:00
Peter Dimov 33782d7cc3 Add test/CMakeLists.txt 2026-02-06 21:33:20 +02:00
Peter Dimov 11c49b2803 Simplify test/Jamfile.v2 2026-02-06 21:33:00 +02:00
Peter Dimov df2bc3704b Add .github/workflows/ci.yml 2026-02-06 21:02:06 +02:00
Andrey Semashev 72673a7dc4 Remove dependencies on Boost.StaticAssert.
Boost.StaticAssert has been merged into Boost.Config, so remove
the dependency.
2026-01-22 20:45:45 +03:00
Peter Dimov cf7d2d2d3b Merge pull request #151 from grafikrobot/modular
Add support for modular build structure.
2025-05-02 19:18:50 +03:00
Rene Rivera 6cd17cbeae Sync from upstream. 2025-04-25 09:07:21 -05:00
neilgroves 1d124e8869 Merge pull request #157 from cho-m/any_iterator_interface-add_const
Add include for add_const
2025-04-25 01:42:52 +01:00
Rene Rivera a377e87bfc Move project global include to target local include. 2025-04-07 21:24:57 -05:00
Rene Rivera 63544b1ec6 Sync from upstream. 2025-04-04 21:40:00 -05:00
Michael Cho 9ac89e9936 Add include for add_const
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2025-03-30 23:07:34 -04:00
neilgroves 24b7c98ca1 Merge pull request #156 from boostorg/develop
Merge Range 20250208 master to develop
2025-02-08 16:31:29 +00:00
neilgroves a18dbf5d33 Merge pull request #155 from Lastique/feature/add_enable_if_convertible_include
Add a dedicated include for enable_if_convertible
2025-02-07 19:15:20 +00:00
Andrey Semashev 55aab1f437 Added a dedicated include for enable_if_convertible.
enable_if_convertible is now defined in a separate header in Boost.Iterator.
Also qualify iterators namespace for enable_if_convertible.
2025-02-07 14:04:57 +03:00
neilgroves f142776ac2 Merge pull request #154 from Lastique/feature/fix_mpl_includes
Fix missing and unneeded Boost.MPL includes
2025-02-07 10:57:30 +00:00
Andrey Semashev c9ebed771c Fix missing and unneeded Boost.MPL includes.
Also update Boost.Core includes to use up to date headers instead
of the deprecated forwarding stubs.
2025-02-01 02:13:04 +03:00
neilgroves bee1538a77 Merge pull request #153 from boostorg/develop
Merge Boost.Range develop -> master
2025-01-26 18:25:16 +00:00
neilgroves acb5648eac Merge pull request #150 from gogagum/develop
Fix missing include in `boost/range/concepts.hpp`.
2024-10-10 23:10:32 +01:00
Rene Rivera 2b6fd29168 Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:23 -05:00
Rene Rivera e3ac7974f3 Update copyright dates. 2024-07-20 22:52:04 -05:00
Rene Rivera c31588ed06 Change all <source> references to <library>. 2024-07-20 19:42:16 -05:00
Rene Rivera 6a13721e44 Bump B2 require to 5.2 2024-06-14 11:33:56 -05:00
Georgiy Guminov bc2127c9a9 Fix missing include. 2024-06-09 17:59:07 +03:00
Rene Rivera 422c4d9b42 Add requires-b2 check to top-level build file. 2024-05-05 09:00:01 -05:00
Rene Rivera a9c1add21c Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:15:59 -05:00
Rene Rivera 048e860e59 Make the library modular usable. 2024-03-11 08:38:17 -05:00
neilgroves 2bb6b63679 Merge pull request #148 from boostorg/develop
20240115_develop_to_master
2024-01-15 18:44:43 +00:00
neilgroves f0e109312c Merge pull request #144 from tobias-loew/fix-mfc
fixed compilation error in mfc.hpp with VS2022, MSVC 14.3
2023-08-28 08:41:52 +01:00
neilgroves 3920ef2e7a Merge pull request #146 from BenFrantzDale/issue-145
Fix for docs: https://github.com/boostorg/range/issues/145
2023-04-21 22:18:11 +01:00
Ben FrantzDale 41bff33b2c Fix for docs: https://github.com/boostorg/range/issues/145 2023-04-21 14:38:08 -04:00
Tobias Loew b2e4d5ad4b Merge branch 'boostorg:develop' into fix-mfc 2023-04-12 09:07:19 +02:00
Tobias Loew d52236c0b8 fixed compilation error in mfc.hpp with VS2022, MSVC 14.3
`const CObList` and `const CPtrList` still return a value from `GetHead`, `GetTail` and `GetAt`. MSVC 14.2 didn't complain about it, but 14.3 does so.

```
1>D:\boost\range\detail\microsoft.hpp(626,33): error C2440: 'return': cannot convert from 'const void *' to 'const void *&'
1>D:\boost\range\detail\microsoft.hpp(624,1): message : while compiling class template member function 'const void *&boost::range_detail_microsoft::list_iterator<const X,const void *,boost::use_default,boost::use_default>::dereference(void) const'
1>        with
1>        [
1>            X=CPtrList
1>        ]
1>D:\boost\iterator\iterator_facade.hpp(631,11): message : see reference to function template instantiation 'const void *&boost::range_detail_microsoft::list_iterator<const X,const void *,boost::use_default,boost::use_default>::dereference(void) const' being compiled
1>        with
1>        [
1>            X=CPtrList
1>        ]
1>D:\boost\range\mfc.hpp(881,1): message : see reference to class template instantiation 'boost::range_detail_microsoft::list_iterator<const X,const void *,boost::use_default,boost::use_default>' being compiled
1>        with
1>        [
1>            X=CPtrList
1>        ]

```
2023-04-12 09:04:41 +02:00
neilgroves 014c48f1b1 Merge pull request #137 from fanquake/patch-1
refactor: use core/noncopyable over boost/noncopyable
2022-08-24 17:55:01 +01:00
Michael Ford 9c783ecbef refactor: use core/noncopyable over boost/noncopyable
The later is deprecated:
```cpp
// The header file at this path is deprecated;
// use boost/core/noncopyable.hpp instead.

#include <boost/core/noncopyable.hpp>
```
2022-08-23 16:00:08 +01:00
Glen Fernandes d6e0a32f2e Merge pull request #131 from BenjaminRodenberg/patch-1
Fix typo
2022-01-23 09:01:28 -05:00
Benjamin Rodenberg 95095cf4bb Fix typo 2022-01-23 12:53:11 +01:00
Peter Dimov 88c6199aed Merge branch 'master' into develop 2021-05-29 01:02:17 +03:00
Peter Dimov fd40a25fea Add CMakeLists.txt 2021-03-18 17:28:05 +02:00
neilgroves da69f60d3e Merge pull request #120 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-01-21 09:13:11 +00:00
Edward Diener 6fc6e92adc [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. 2021-01-21 03:20:56 -05:00
Glen Fernandes e13030df17 Merge pull request #117 from Mike-Devel/patch-1
Replace include of outdated boost/cast.hpp header
2020-12-12 09:21:49 -05:00
Mike-Devel 6776ffa8e8 Replace incldue of outdated boost/cast.hpp header
- Instead include `boost/polymorphic_cast.hpp` directly.
- This replaces the direct dependency of Boost.Range on Boost.NumericConversion with a direct dependency on Boost.Conversion
2020-11-19 14:25:21 +01:00
32 changed files with 1099 additions and 238 deletions
+674
View File
@@ -0,0 +1,674 @@
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"
container: ubuntu:18.04
os: ubuntu-latest
install: g++-4.8-multilib
address-model: 32,64
- toolset: gcc-4.9
cxxstd: "11"
container: ubuntu:16.04
os: ubuntu-latest
install: g++-4.9-multilib
address-model: 32,64
- toolset: gcc-5
cxxstd: "11,14,1z"
container: ubuntu:18.04
os: ubuntu-latest
install: g++-5-multilib
address-model: 32,64
- toolset: gcc-6
cxxstd: "11,14,1z"
container: ubuntu:18.04
os: ubuntu-latest
install: g++-6-multilib
address-model: 32,64
- toolset: gcc-7
cxxstd: "11,14,17"
container: ubuntu:20.04
os: ubuntu-latest
install: g++-7-multilib
address-model: 32,64
- toolset: gcc-8
cxxstd: "11,14,17,2a"
container: ubuntu:20.04
os: ubuntu-latest
install: g++-8-multilib
address-model: 32,64
- toolset: gcc-9
cxxstd: "11,14,17,2a"
container: ubuntu:20.04
os: ubuntu-latest
install: g++-9-multilib
address-model: 32,64
- toolset: gcc-10
cxxstd: "11,14,17,2a"
container: ubuntu:22.04
os: ubuntu-latest
install: g++-10-multilib
address-model: 32,64
- toolset: gcc-11
cxxstd: "11,14,17,20"
container: ubuntu:22.04
os: ubuntu-latest
install: g++-11-multilib
address-model: 32,64
- toolset: gcc-12
cxxstd: "11,14,17,20,2b"
container: ubuntu:22.04
os: ubuntu-latest
install: g++-12-multilib
address-model: 32,64
- toolset: gcc-13
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: g++-13-multilib
address-model: 32,64
- toolset: gcc-14
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: g++-14-multilib
address-model: 32,64
- toolset: gcc-15
cxxstd: "11,14,17"
container: ubuntu:25.10
os: ubuntu-latest
install: g++-15-multilib
address-model: 32,64
- toolset: gcc-15
cxxstd: "20,23,2c"
container: ubuntu:25.10
os: ubuntu-latest
install: g++-15-multilib
address-model: 32,64
- toolset: clang
compiler: clang++-3.9
cxxstd: "11,14"
container: ubuntu:18.04
os: ubuntu-latest
install: clang-3.9
- toolset: clang
compiler: clang++-4.0
cxxstd: "11,14"
container: ubuntu:18.04
os: ubuntu-latest
install: clang-4.0
- toolset: clang
compiler: clang++-5.0
cxxstd: "11,14,1z"
container: ubuntu:18.04
os: ubuntu-latest
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,20"
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
compiler: clang++-19
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: clang-19
- toolset: clang
compiler: clang++-20
cxxstd: "11,14,17,20,2b"
container: ubuntu:24.04
os: ubuntu-latest
install: clang-20
- toolset: clang
compiler: clang++-21
cxxstd: "11,14,17,20,23,2c"
container: ubuntu:25.10
os: ubuntu-latest
install: clang-21
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-14
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-15
- toolset: clang
cxxstd: "11,14,17,20,23,2c"
os: macos-26
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 -I examples $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
export ADDRMD=${{matrix.address-model}}
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} variant=debug,release
windows:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.3
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2022
- toolset: clang-win
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2025
- toolset: gcc
cxxstd: "11,14,17,2a"
addrmd: 64
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 -I examples --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 embed-manifest-via=linker
posix-cmake-subdir:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
run: 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
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-latest
- os: macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
run: 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
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-latest
- os: macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install packages
if: matrix.install
run: 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
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-latest
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-latest
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-latest
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
+40
View File
@@ -0,0 +1,40 @@
# Generated by `boostdep --cmake range`
# 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_range VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_range INTERFACE)
add_library(Boost::range ALIAS boost_range)
target_include_directories(boost_range INTERFACE include)
target_link_libraries(boost_range
INTERFACE
Boost::array
Boost::assert
Boost::concept_check
Boost::config
Boost::container_hash
Boost::conversion
Boost::core
Boost::detail
Boost::iterator
Boost::mpl
Boost::optional
Boost::preprocessor
Boost::regex
Boost::tuple
Boost::type_traits
Boost::utility
)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
+36
View File
@@ -0,0 +1,36 @@
# 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/array//boost_array
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/container_hash//boost_container_hash
/boost/conversion//boost_conversion
/boost/core//boost_core
/boost/detail//boost_detail
/boost/iterator//boost_iterator
/boost/mpl//boost_mpl
/boost/optional//boost_optional
/boost/preprocessor//boost_preprocessor
/boost/regex//boost_regex
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility ;
project /boost/range
;
explicit
[ alias boost_range : : :
: <include>include <library>$(boost_dependencies) ]
[ alias all : boost_range test ]
;
call-if : boost-library range
;
+1 -1
View File
@@ -14,7 +14,7 @@
* [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`. * [*Precondition:] The `value_type` of the range is an instantiation of `std::pair`.
* [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.second` where `y` is the corresponding element in the original range. * [*Postcondition:] For all elements `x` in the returned range, `x` is the result of `y.second` where `y` is the corresponding element in the original range.
* [*Range Category:] __single_pass_range__ * [*Range Category:] __single_pass_range__
* [*Range Return Type:] for constant ranges, `boost::select_second_const<decltype(rng)>` otherwise `boost:select_second_mutable<decltype(rng)>` * [*Range Return Type:] for constant ranges, `boost::select_second_const<decltype(rng)>` otherwise `boost::select_second_mutable<decltype(rng)>`
* [*Returned Range Category:] The range category of `rng`. * [*Returned Range Category:] The range category of `rng`.
[section:map_values_example map_values example] [section:map_values_example map_values example]
+4 -2
View File
@@ -19,9 +19,11 @@ bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred);
`is_sorted` determines if a range is sorted. `is_sorted` determines if a range is sorted.
For the non-predicate version the return value is `true` if and only if for For the non-predicate version the return value is `true` if and only if for
each adjacent elements `[x,y]` the expression `x < y` is `true`. each adjacent elements `[x, y]` the expression `y < x` is `false` (i.e.,
`x <= y`), or if the number of elements is zero or one.
For the predicate version the return value is `true` is and only if for each For the predicate version the return value is `true` is and only if for each
adjacent elements `[x,y]` the expression `pred(x,y)` is `true`. adjacent elements `[x, y]` the expression `pred(y, x)` is `false`, or if the
number of elements is zero or one.
[heading Definition] [heading Definition]
+8 -7
View File
@@ -14,6 +14,7 @@
#include <boost/range/adaptor/argument_fwd.hpp> #include <boost/range/adaptor/argument_fwd.hpp>
#include <boost/range/iterator_range.hpp> #include <boost/range/iterator_range.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/enable_if_convertible.hpp>
#include <iterator> #include <iterator>
namespace boost namespace boost
@@ -66,7 +67,7 @@ namespace boost
template<class OtherIterator> template<class OtherIterator>
strided_iterator( strided_iterator(
const strided_iterator<OtherIterator, Category>& other, const strided_iterator<OtherIterator, Category>& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, OtherIterator,
base_iterator base_iterator
>::type* = 0 >::type* = 0
@@ -110,7 +111,7 @@ namespace boost
template<class OtherIterator> template<class OtherIterator>
bool equal( bool equal(
const strided_iterator<OtherIterator, Category>& other, const strided_iterator<OtherIterator, Category>& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, OtherIterator,
base_iterator base_iterator
>::type* = 0) const >::type* = 0) const
@@ -177,7 +178,7 @@ namespace boost
OtherIterator, OtherIterator,
bidirectional_traversal_tag bidirectional_traversal_tag
>& other, >& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, OtherIterator,
base_iterator base_iterator
>::type* = 0 >::type* = 0
@@ -239,7 +240,7 @@ namespace boost
OtherIterator, OtherIterator,
bidirectional_traversal_tag bidirectional_traversal_tag
>& other, >& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, OtherIterator,
base_iterator base_iterator
>::type* = 0) const >::type* = 0) const
@@ -308,7 +309,7 @@ namespace boost
OtherIterator, OtherIterator,
random_access_traversal_tag random_access_traversal_tag
>& other, >& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, OtherIterator,
base_iterator base_iterator
>::type* = 0 >::type* = 0
@@ -372,7 +373,7 @@ namespace boost
OtherIterator, OtherIterator,
random_access_traversal_tag random_access_traversal_tag
>& other, >& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, base_iterator>::type* = 0) const OtherIterator, base_iterator>::type* = 0) const
{ {
BOOST_ASSERT((other.m_index - m_index) % m_stride == difference_type()); BOOST_ASSERT((other.m_index - m_index) % m_stride == difference_type());
@@ -385,7 +386,7 @@ namespace boost
OtherIterator, OtherIterator,
random_access_traversal_tag random_access_traversal_tag
>& other, >& other,
typename enable_if_convertible< typename iterators::enable_if_convertible<
OtherIterator, base_iterator>::type* = 0) const OtherIterator, base_iterator>::type* = 0) const
{ {
return m_index == other.m_index; return m_index == other.m_index;
+2 -2
View File
@@ -13,8 +13,8 @@
#include <boost/range/begin.hpp> #include <boost/range/begin.hpp>
#include <boost/range/end.hpp> #include <boost/range/end.hpp>
#include <boost/range/concepts.hpp> #include <boost/range/concepts.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/core/enable_if.hpp>
#include <boost/ref.hpp> #include <boost/core/ref.hpp>
#include <algorithm> #include <algorithm>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) #if BOOST_WORKAROUND(BOOST_MSVC, == 1600)
+2
View File
@@ -10,6 +10,8 @@
#define BOOST_RANGE_ANY_RANGE_HPP_INCLUDED #define BOOST_RANGE_ANY_RANGE_HPP_INCLUDED
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/iterator/iterator_categories.hpp> #include <boost/iterator/iterator_categories.hpp>
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
+2
View File
@@ -23,7 +23,9 @@
#include <boost/range/iterator.hpp> #include <boost/range/iterator.hpp>
#include <boost/range/value_type.hpp> #include <boost/range/value_type.hpp>
#include <boost/range/detail/misc_concept.hpp> #include <boost/range/detail/misc_concept.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <iterator> #include <iterator>
+2 -1
View File
@@ -13,6 +13,7 @@
#include <boost/mpl/and.hpp> #include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp> #include <boost/mpl/or.hpp>
#include <boost/mpl/not.hpp> #include <boost/mpl/not.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_reference.hpp> #include <boost/type_traits/is_reference.hpp>
@@ -20,7 +21,7 @@
#include <boost/range/detail/any_iterator_buffer.hpp> #include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/range/detail/any_iterator_interface.hpp> #include <boost/range/detail/any_iterator_interface.hpp>
#include <boost/range/detail/any_iterator_wrapper.hpp> #include <boost/range/detail/any_iterator_wrapper.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/core/enable_if.hpp>
namespace boost namespace boost
{ {
@@ -13,7 +13,7 @@
#include <boost/array.hpp> #include <boost/array.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/noncopyable.hpp> #include <boost/core/noncopyable.hpp>
namespace boost namespace boost
{ {
@@ -10,8 +10,10 @@
#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED #ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED #define BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED
#include <boost/mpl/if.hpp>
#include <boost/range/detail/any_iterator_buffer.hpp> #include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/iterator/iterator_categories.hpp> #include <boost/iterator/iterator_categories.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_convertible.hpp> #include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_reference.hpp> #include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
@@ -10,7 +10,7 @@
#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED #ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED #define BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED
#include <boost/cast.hpp> #include <boost/polymorphic_cast.hpp>
#include <boost/range/config.hpp> #include <boost/range/config.hpp>
#include <boost/range/detail/any_iterator_interface.hpp> #include <boost/range/detail/any_iterator_interface.hpp>
#include <boost/range/concepts.hpp> #include <boost/range/concepts.hpp>
@@ -20,10 +20,7 @@
#include <boost/type_traits/is_convertible.hpp> #include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/remove_pointer.hpp> #include <boost/type_traits/remove_pointer.hpp>
#include <boost/type_traits/remove_cv.hpp> #include <boost/type_traits/remove_cv.hpp>
#include <boost/mpl/eval_if.hpp> #include <boost/mpl/if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/fold.hpp>
// Container traits implementation --------------------------------------------------------- // Container traits implementation ---------------------------------------------------------
@@ -13,6 +13,7 @@
#include <boost/type_traits/is_class.hpp> #include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp> #include <boost/type_traits/is_member_function_pointer.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp> #include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp> #include <boost/mpl/bool.hpp>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
@@ -19,6 +19,7 @@
#include <iterator> #include <iterator>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/mpl/if.hpp>
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/range/begin.hpp> #include <boost/range/begin.hpp>
+2 -2
View File
@@ -56,8 +56,8 @@
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp> #include <boost/type_traits/remove_cv.hpp>
#include <boost/utility/addressof.hpp> #include <boost/core/addressof.hpp>
#include <boost/utility/enable_if.hpp> // disable_if #include <boost/core/enable_if.hpp> // disable_if
#include <boost/next_prior.hpp> #include <boost/next_prior.hpp>
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1) #if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
@@ -20,6 +20,8 @@
#endif #endif
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) #if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
#include <boost/mpl/bool.hpp>
namespace boost namespace boost
{ {
namespace cb_details namespace cb_details
+1 -1
View File
@@ -18,7 +18,7 @@
#include <boost/mpl/has_xxx.hpp> #include <boost/mpl/has_xxx.hpp>
#include <boost/range/iterator.hpp> #include <boost/range/iterator.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/core/enable_if.hpp>
namespace boost namespace boost
{ {
+1
View File
@@ -22,6 +22,7 @@
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
#include <boost/mpl/eval_if.hpp> #include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
namespace boost namespace boost
{ {
+4 -1
View File
@@ -26,8 +26,11 @@
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/not.hpp> #include <boost/mpl/not.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp> #include <boost/mpl/or.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_abstract.hpp> #include <boost/type_traits/is_abstract.hpp>
#include <boost/type_traits/is_array.hpp> #include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_base_and_derived.hpp> #include <boost/type_traits/is_base_and_derived.hpp>
@@ -41,7 +44,7 @@
#include <boost/range/has_range_iterator.hpp> #include <boost/range/has_range_iterator.hpp>
#include <boost/range/algorithm/equal.hpp> #include <boost/range/algorithm/equal.hpp>
#include <boost/range/detail/safe_bool.hpp> #include <boost/range/detail/safe_bool.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/core/enable_if.hpp>
#include <boost/next_prior.hpp> #include <boost/next_prior.hpp>
#include <iterator> #include <iterator>
#include <algorithm> #include <algorithm>
+3 -9
View File
@@ -90,7 +90,7 @@ class CTypedPtrMap;
#include <boost/iterator/transform_iterator.hpp> #include <boost/iterator/transform_iterator.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_pointer.hpp> #include <boost/type_traits/remove_pointer.hpp>
#include <boost/utility/addressof.hpp> #include <boost/core/addressof.hpp>
#include <afx.h> // legacy CString #include <afx.h> // legacy CString
#include <afxcoll.h> // CXXXArray, CXXXList, CMapXXXToXXX #include <afxcoll.h> // CXXXArray, CXXXList, CMapXXXToXXX
#include <tchar.h> #include <tchar.h>
@@ -292,11 +292,8 @@ namespace boost { namespace range_detail_microsoft {
struct meta struct meta
{ {
typedef list_iterator<X, ::CObject *> mutable_iterator; typedef list_iterator<X, ::CObject *> mutable_iterator;
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) // const CObList and const CPtrList both return a value (and probably always will)
typedef list_iterator<X const, ::CObject const *> const_iterator;
#else
typedef list_iterator<X const, ::CObject const * const, ::CObject const * const> const_iterator; typedef list_iterator<X const, ::CObject const * const, ::CObject const * const> const_iterator;
#endif
}; };
}; };
@@ -309,11 +306,8 @@ namespace boost { namespace range_detail_microsoft {
struct meta struct meta
{ {
typedef list_iterator<X, void *> mutable_iterator; typedef list_iterator<X, void *> mutable_iterator;
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF) // const CObList and const CPtrList both return a value (and probably always will)
typedef list_iterator<X const, void const *> const_iterator;
#else
typedef list_iterator<X const, void const * const, void const * const> const_iterator; typedef list_iterator<X const, void const * const, void const * const> const_iterator;
#endif
}; };
}; };
+1 -1
View File
@@ -20,7 +20,7 @@
#include <boost/range/concepts.hpp> #include <boost/range/concepts.hpp>
#include <boost/range/has_range_iterator.hpp> #include <boost/range/has_range_iterator.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/core/enable_if.hpp>
#include <boost/type_traits/make_unsigned.hpp> #include <boost/type_traits/make_unsigned.hpp>
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
#include <cstddef> #include <cstddef>
+2
View File
@@ -27,6 +27,8 @@
#include <boost/range/reference.hpp> #include <boost/range/reference.hpp>
#include <boost/range/algorithm/equal.hpp> #include <boost/range/algorithm/equal.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_reference.hpp> #include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
+2 -1
View File
@@ -12,5 +12,6 @@
"maintainers": [ "maintainers": [
"Neil Groves <neilgroves -at- googlemail.com>", "Neil Groves <neilgroves -at- googlemail.com>",
"Nathan Ridge <zeratul976 -at- hotmail.com>" "Nathan Ridge <zeratul976 -at- hotmail.com>"
] ],
"cxxstd": "03"
} }
+22
View File
@@ -0,0 +1,22 @@
# 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.v2
LINK_LIBRARIES
Boost::range
Boost::unit_test_framework
Boost::assign
Boost::foreach
Boost::lambda
Boost::regex
Boost::variant
)
endif()
+206 -202
View File
@@ -14,213 +14,217 @@ import testing ;
project project
: requirements : requirements
<library>/boost/test//boost_unit_test_framework/ <library>/boost/assign//boost_assign
<library>/boost/regex//boost_regex/ <library>/boost/foreach//boost_foreach
<library>/boost/lambda//boost_lambda
<library>/boost/regex//boost_regex/<link>static
<library>/boost/test//boost_unit_test_framework
<library>/boost/variant//boost_variant
<link>static <link>static
<threading>multi <threading>multi
<warnings>all
; ;
rule range-test ( name : includes * ) compile-fail compile_fail/iterator_range1.cpp ;
{ compile-fail compile_fail/adaptor/adjacent_filtered_concept.cpp ;
return [ compile-fail compile_fail/adaptor/adjacent_filtered_concept2.cpp ;
run $(name).cpp /boost/test//boost_unit_test_framework /boost/regex//boost_regex/<link>static compile-fail compile_fail/adaptor/adjacent_filtered_concept3.cpp ;
: compile-fail compile_fail/adaptor/adjacent_filtered_concept4.cpp ;
: compile-fail compile_fail/adaptor/copied_concept.cpp ;
: <toolset>gcc:<cxxflags>"-Wall -Wunused " compile-fail compile_fail/adaptor/copied_concept2.cpp ;
] ; compile-fail compile_fail/adaptor/copied_concept3.cpp ;
} compile-fail compile_fail/adaptor/copied_concept4.cpp ;
compile-fail compile_fail/adaptor/reversed_concept.cpp ;
compile-fail compile_fail/adaptor/reversed_concept2.cpp ;
compile-fail compile_fail/adaptor/reversed_concept3.cpp ;
compile-fail compile_fail/adaptor/reversed_concept4.cpp ;
compile-fail compile_fail/adaptor/sliced_concept.cpp ;
compile-fail compile_fail/adaptor/sliced_concept2.cpp ;
compile-fail compile_fail/adaptor/sliced_concept3.cpp ;
compile-fail compile_fail/adaptor/sliced_concept4.cpp ;
compile-fail compile_fail/adaptor/uniqued_concept.cpp ;
compile-fail compile_fail/adaptor/uniqued_concept2.cpp ;
compile-fail compile_fail/adaptor/uniqued_concept3.cpp ;
compile-fail compile_fail/adaptor/uniqued_concept4.cpp ;
test-suite range : run adaptor_test/adjacent_filtered.cpp ;
[ compile-fail compile_fail/iterator_range1.cpp ] run adaptor_test/chained.cpp ;
[ compile-fail compile_fail/adaptor/adjacent_filtered_concept.cpp ] run adaptor_test/copied.cpp ;
[ compile-fail compile_fail/adaptor/adjacent_filtered_concept2.cpp ] run adaptor_test/filtered.cpp ;
[ compile-fail compile_fail/adaptor/adjacent_filtered_concept3.cpp ] run adaptor_test/indexed.cpp ;
[ compile-fail compile_fail/adaptor/adjacent_filtered_concept4.cpp ] run adaptor_test/indirected.cpp ;
[ compile-fail compile_fail/adaptor/copied_concept.cpp ] run adaptor_test/map.cpp ;
[ compile-fail compile_fail/adaptor/copied_concept2.cpp ] run adaptor_test/ref_unwrapped.cpp ;
[ compile-fail compile_fail/adaptor/copied_concept3.cpp ] run adaptor_test/ref_unwrapped_example.cpp ;
[ compile-fail compile_fail/adaptor/copied_concept4.cpp ] run adaptor_test/replaced.cpp ;
[ compile-fail compile_fail/adaptor/reversed_concept.cpp ] run adaptor_test/replaced_if.cpp ;
[ compile-fail compile_fail/adaptor/reversed_concept2.cpp ] run adaptor_test/reversed.cpp ;
[ compile-fail compile_fail/adaptor/reversed_concept3.cpp ] run adaptor_test/sliced.cpp ;
[ compile-fail compile_fail/adaptor/reversed_concept4.cpp ] run adaptor_test/strided.cpp ;
[ compile-fail compile_fail/adaptor/sliced_concept.cpp ] run adaptor_test/strided2.cpp ;
[ compile-fail compile_fail/adaptor/sliced_concept2.cpp ]
[ compile-fail compile_fail/adaptor/sliced_concept3.cpp ] run adaptor_test/ticket_6742_transformed_c4789_warning.cpp : : : <library>/boost/phoenix//boost_phoenix
[ compile-fail compile_fail/adaptor/sliced_concept4.cpp ] # copy assignment operator of 'transform_iterator<boost::phoenix::actor<...' is deleted
[ compile-fail compile_fail/adaptor/uniqued_concept.cpp ] <target-os>darwin:<build>no ;
[ compile-fail compile_fail/adaptor/uniqued_concept2.cpp ]
[ compile-fail compile_fail/adaptor/uniqued_concept3.cpp ] run adaptor_test/ticket_8676_sliced_transformed.cpp ;
[ compile-fail compile_fail/adaptor/uniqued_concept4.cpp ] run adaptor_test/ticket_9519_strided_reversed.cpp ;
[ range-test adaptor_test/adjacent_filtered ] run adaptor_test/tokenized.cpp ;
[ range-test adaptor_test/chained ] run adaptor_test/transformed.cpp ;
[ range-test adaptor_test/copied ] run adaptor_test/type_erased.cpp ;
[ range-test adaptor_test/filtered ] run adaptor_test/type_erased_abstract.cpp ;
[ range-test adaptor_test/indexed ] run adaptor_test/type_erased_brackets.cpp ;
[ range-test adaptor_test/indirected ] run adaptor_test/type_erased_mix_values.cpp ;
[ range-test adaptor_test/map ] run adaptor_test/type_erased_tparam_conv.cpp ;
[ range-test adaptor_test/ref_unwrapped ] run adaptor_test/type_erased_single_pass.cpp ;
[ range-test adaptor_test/ref_unwrapped_example ] run adaptor_test/type_erased_forward.cpp ;
[ range-test adaptor_test/replaced ] run adaptor_test/type_erased_bidirectional.cpp ;
[ range-test adaptor_test/replaced_if ] run adaptor_test/type_erased_random_access.cpp ;
[ range-test adaptor_test/reversed ] run adaptor_test/type_erased_transformed.cpp ;
[ range-test adaptor_test/sliced ] run adaptor_test/uniqued.cpp ;
[ range-test adaptor_test/strided ] run adaptor_test/adjacent_filtered_example.cpp ;
[ range-test adaptor_test/strided2 ] run adaptor_test/copied_example.cpp ;
[ range-test adaptor_test/ticket_6742_transformed_c4789_warning ] run adaptor_test/filtered_example.cpp ;
[ range-test adaptor_test/ticket_8676_sliced_transformed ] run adaptor_test/formatted.cpp ;
[ range-test adaptor_test/ticket_9519_strided_reversed ] run adaptor_test/formatted_example.cpp ;
[ range-test adaptor_test/tokenized ] run adaptor_test/indexed_example.cpp ;
[ range-test adaptor_test/transformed ] run adaptor_test/indirected_example.cpp ;
[ range-test adaptor_test/type_erased ] run adaptor_test/map_keys_example.cpp ;
[ range-test adaptor_test/type_erased_abstract ] run adaptor_test/map_values_example.cpp ;
[ range-test adaptor_test/type_erased_brackets ] run adaptor_test/replaced_example.cpp ;
[ range-test adaptor_test/type_erased_mix_values ] run adaptor_test/replaced_if_example.cpp ;
[ range-test adaptor_test/type_erased_tparam_conv ] run adaptor_test/reversed_example.cpp ;
[ range-test adaptor_test/type_erased_single_pass ] run adaptor_test/sliced_example.cpp ;
[ range-test adaptor_test/type_erased_forward ] run adaptor_test/strided_example.cpp ;
[ range-test adaptor_test/type_erased_bidirectional ] run adaptor_test/transformed_example.cpp ;
[ range-test adaptor_test/type_erased_random_access ] run adaptor_test/tokenized_example.cpp ;
[ range-test adaptor_test/type_erased_transformed ] run adaptor_test/type_erased_example.cpp ;
[ range-test adaptor_test/uniqued ] run adaptor_test/uniqued_example.cpp ;
[ range-test adaptor_test/adjacent_filtered_example ]
[ range-test adaptor_test/copied_example ] run algorithm_test/adjacent_find.cpp ;
[ range-test adaptor_test/filtered_example ] run algorithm_test/binary_search.cpp ;
[ range-test adaptor_test/formatted ] run algorithm_test/copy.cpp ;
[ range-test adaptor_test/formatted_example ] run algorithm_test/copy_backward.cpp ;
[ range-test adaptor_test/indexed_example ] run algorithm_test/count.cpp ;
[ range-test adaptor_test/indirected_example ] run algorithm_test/count_if.cpp ;
[ range-test adaptor_test/map_keys_example ] run algorithm_test/equal.cpp ;
[ range-test adaptor_test/map_values_example ] run algorithm_test/equal_range.cpp ;
[ range-test adaptor_test/replaced_example ] run algorithm_test/fill.cpp ;
[ range-test adaptor_test/replaced_if_example ] run algorithm_test/find.cpp ;
[ range-test adaptor_test/reversed_example ] run algorithm_test/find_if.cpp ;
[ range-test adaptor_test/sliced_example ]
[ range-test adaptor_test/strided_example ] # these two tests require /bigobj in windows-cmake-test
[ range-test adaptor_test/transformed_example ] run algorithm_test/find_end.cpp : ;
[ range-test adaptor_test/tokenized_example ] run algorithm_test/find_first_of.cpp : ;
[ range-test adaptor_test/type_erased_example ]
[ range-test adaptor_test/uniqued_example ] run algorithm_test/for_each.cpp ;
[ range-test algorithm_test/adjacent_find ] run algorithm_test/generate.cpp ;
[ range-test algorithm_test/binary_search ] run algorithm_test/heap.cpp ;
[ range-test algorithm_test/copy ] run algorithm_test/includes.cpp ;
[ range-test algorithm_test/copy_backward ] run algorithm_test/inplace_merge.cpp ;
[ range-test algorithm_test/count ] run algorithm_test/lexicographical_compare.cpp ;
[ range-test algorithm_test/count_if ] run algorithm_test/lower_bound.cpp ;
[ range-test algorithm_test/equal ] run algorithm_test/max_element.cpp ;
[ range-test algorithm_test/equal_range ] run algorithm_test/merge.cpp ;
[ range-test algorithm_test/fill ] run algorithm_test/min_element.cpp ;
[ range-test algorithm_test/find ] run algorithm_test/mismatch.cpp ;
[ range-test algorithm_test/find_if ] run algorithm_test/next_permutation.cpp ;
[ range-test algorithm_test/find_end ] run algorithm_test/nth_element.cpp ;
[ range-test algorithm_test/find_first_of ] run algorithm_test/partial_sort.cpp ;
[ range-test algorithm_test/for_each ] run algorithm_test/partition.cpp ;
[ range-test algorithm_test/generate ] run algorithm_test/prev_permutation.cpp ;
[ range-test algorithm_test/heap ] run algorithm_test/random_shuffle.cpp ;
[ range-test algorithm_test/includes ] run algorithm_test/remove.cpp ;
[ range-test algorithm_test/inplace_merge ] run algorithm_test/remove_copy.cpp ;
[ range-test algorithm_test/lexicographical_compare ] run algorithm_test/remove_copy_if.cpp ;
[ range-test algorithm_test/lower_bound ] run algorithm_test/remove_if.cpp ;
[ range-test algorithm_test/max_element ] run algorithm_test/replace.cpp ;
[ range-test algorithm_test/merge ] run algorithm_test/replace_copy.cpp ;
[ range-test algorithm_test/min_element ] run algorithm_test/replace_copy_if.cpp ;
[ range-test algorithm_test/mismatch ] run algorithm_test/replace_if.cpp ;
[ range-test algorithm_test/next_permutation ] run algorithm_test/reverse.cpp ;
[ range-test algorithm_test/nth_element ] run algorithm_test/reverse_copy.cpp ;
[ range-test algorithm_test/partial_sort ] run algorithm_test/rotate.cpp ;
[ range-test algorithm_test/partition ] run algorithm_test/rotate_copy.cpp ;
[ range-test algorithm_test/prev_permutation ] run algorithm_test/search.cpp ;
[ range-test algorithm_test/random_shuffle ] run algorithm_test/search_n.cpp ;
[ range-test algorithm_test/remove ] run algorithm_test/set_difference.cpp ;
[ range-test algorithm_test/remove_copy ] run algorithm_test/set_intersection.cpp ;
[ range-test algorithm_test/remove_copy_if ] run algorithm_test/set_symmetric_difference.cpp ;
[ range-test algorithm_test/remove_if ] run algorithm_test/set_union.cpp ;
[ range-test algorithm_test/replace ] run algorithm_test/sort.cpp ;
[ range-test algorithm_test/replace_copy ] run algorithm_test/stable_partition.cpp ;
[ range-test algorithm_test/replace_copy_if ] run algorithm_test/stable_sort.cpp ;
[ range-test algorithm_test/replace_if ] run algorithm_test/swap_ranges.cpp ;
[ range-test algorithm_test/reverse ] run algorithm_test/transform.cpp ;
[ range-test algorithm_test/reverse_copy ] run algorithm_test/unique.cpp ;
[ range-test algorithm_test/rotate ] run algorithm_test/unique_copy.cpp ;
[ range-test algorithm_test/rotate_copy ] run algorithm_test/upper_bound.cpp ;
[ range-test algorithm_test/search ]
[ range-test algorithm_test/search_n ] run algorithm_ext_test/copy_n.cpp ;
[ range-test algorithm_test/set_difference ] run algorithm_ext_test/erase.cpp ;
[ range-test algorithm_test/set_intersection ] run algorithm_ext_test/for_each_ext.cpp ;
[ range-test algorithm_test/set_symmetric_difference ] run algorithm_ext_test/insert.cpp ;
[ range-test algorithm_test/set_union ] run algorithm_ext_test/iota.cpp ;
[ range-test algorithm_test/sort ] run algorithm_ext_test/is_sorted.cpp ;
[ range-test algorithm_test/stable_partition ] run algorithm_ext_test/overwrite.cpp ;
[ range-test algorithm_test/stable_sort ] run algorithm_ext_test/push_back.cpp ;
[ range-test algorithm_test/swap_ranges ] run algorithm_ext_test/push_front.cpp ;
[ range-test algorithm_test/transform ]
[ range-test algorithm_test/unique ] run adl_conformance.cpp ;
[ range-test algorithm_test/unique_copy ] run adl_conformance_no_using.cpp ;
[ range-test algorithm_test/upper_bound ] run algorithm.cpp ;
[ range-test algorithm_ext_test/copy_n ] run algorithm_example.cpp ;
[ range-test algorithm_ext_test/erase ] run array.cpp ;
[ range-test algorithm_ext_test/for_each_ext ] #run atl.cpp : <include>$(VC71_ROOT)/atlmfc/include ;
[ range-test algorithm_ext_test/insert ] run begin.cpp ;
[ range-test algorithm_ext_test/iota ] run category.cpp ;
[ range-test algorithm_ext_test/is_sorted ] run combine.cpp ;
[ range-test algorithm_ext_test/overwrite ] run compat2.cpp ;
[ range-test algorithm_ext_test/push_back ] run compat3.cpp ;
[ range-test algorithm_ext_test/push_front ] run const_iterator.cpp ;
[ range-test adl_conformance ] run const_ranges.cpp ;
[ range-test adl_conformance_no_using ] run const_reverse_iterator.cpp ;
[ range-test algorithm ] run counting_range.cpp ;
[ range-test algorithm_example ] run difference_type.cpp ;
[ range-test array ] run end.cpp ;
# [ range-test atl : <include>$(VC71_ROOT)/atlmfc/include ] run extension_mechanism.cpp ;
[ range-test begin ] run extension_size.cpp ;
[ range-test category ] run has_range_iterator.cpp ;
[ range-test combine ] run irange.cpp ;
[ range-test compat2 ] run istream_range.cpp ;
[ range-test compat3 ] run iterator.cpp ;
[ range-test const_iterator ] run iterator_ext.cpp ;
[ range-test const_ranges ] run iterator_pair.cpp ;
[ range-test const_reverse_iterator ] run iterator_range.cpp ;
[ range-test counting_range ] run iterator_range_drop.cpp ;
[ range-test difference_type ] run iterator_range_equality_bug.cpp ;
[ range-test end ] run iterator_range_hash.cpp ;
[ range-test extension_mechanism ] run iterator_range_variant.cpp ;
[ range-test extension_size ] #run mfc.cpp : <include>$(VC71_ROOT)/atlmfc/include ;
[ range-test has_range_iterator ] run join.cpp ;
[ range-test irange ] run mutable_iterator.cpp ;
[ range-test istream_range ] run partial_workaround.cpp ;
[ range-test iterator ] run pointer.cpp ;
[ range-test iterator_ext ] run pointer_as_iterator.cpp ;
[ range-test iterator_pair ] run reference.cpp ;
[ range-test iterator_range ] run result_iterator.cpp ;
[ range-test iterator_range_drop ] run reverse_iterator.cpp ;
[ range-test iterator_range_equality_bug ] run reverse_result_iterator.cpp ;
[ range-test iterator_range_hash ] run reversible_range.cpp ;
[ range-test iterator_range_variant ] run size_type.cpp ;
# [ range-test mfc : <include>$(VC71_ROOT)/atlmfc/include ] run std_container.cpp ;
[ range-test join ] run string.cpp ;
[ range-test mutable_iterator ] run sub_range.cpp ;
[ range-test partial_workaround ] run ticket_5486.cpp ;
[ range-test pointer ] run ticket_5544_terminate_irange.cpp ;
[ range-test pointer_as_iterator ] run ticket_5547.cpp ;
[ range-test reference ] run ticket_5556_is_sorted_namespace.cpp ;
[ range-test result_iterator ] run ticket_5811_indirected_optional.cpp ;
[ range-test reverse_iterator ] run ticket_6715_iterator_range_equality.cpp ;
[ range-test reverse_result_iterator ] run ticket_6944.cpp ;
[ range-test reversible_range ] run ticket_10336.cpp ;
[ range-test size_type ] run value_type.cpp ;
[ range-test std_container ]
[ range-test string ]
[ range-test sub_range ]
[ range-test ticket_5486 ]
[ range-test ticket_5544_terminate_irange ]
[ range-test ticket_5547 ]
[ range-test ticket_5556_is_sorted_namespace ]
[ range-test ticket_5811_indirected_optional ]
[ range-test ticket_6715_iterator_range_equality ]
[ range-test ticket_6944 ]
[ range-test ticket_10336 ]
[ range-test value_type ]
;
# `quick` target (for CI) # `quick` target (for CI)
alias quick : std_container ; alias quick : std_container ;
+2 -2
View File
@@ -23,13 +23,13 @@
#define _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS
#endif #endif
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
// counting_iterator generates a warning about truncating an integer // counting_iterator generates a warning about truncating an integer
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 4244) #pragma warning(disable : 4244)
#endif #endif
#include <boost/iterator/counting_iterator.hpp> #include <boost/iterator/counting_iterator.hpp>
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
template ::boost::counting_iterator<int>; template ::boost::counting_iterator<int>;
#pragma warning(pop) #pragma warning(pop)
#endif #endif
+17
View 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.31)
project(cmake_install_test LANGUAGES CXX)
find_package(boost_range REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main Boost::range)
enable_testing()
add_test(main main)
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+19
View File
@@ -0,0 +1,19 @@
// Copyright 2026 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#undef NDEBUG
#include <boost/range.hpp>
#include <string>
#include <cassert>
int main()
{
std::string s( "foo" );
assert( boost::begin( s ) == s.begin() );
assert( boost::end( s ) == s.end() );
assert( boost::empty( s ) == s.empty() );
assert( boost::size( s ) == s.size() );
}
+18
View 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.31)
project(cmake_subdir_test LANGUAGES CXX)
set(BOOST_INCLUDE_LIBRARIES range)
add_subdirectory(../../../.. boostorg/boost)
add_executable(main main.cpp)
target_link_libraries(main Boost::range)
enable_testing()
add_test(main main)
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
+19
View File
@@ -0,0 +1,19 @@
// Copyright 2026 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
#undef NDEBUG
#include <boost/range.hpp>
#include <string>
#include <cassert>
int main()
{
std::string s( "foo" );
assert( boost::begin( s ) == s.begin() );
assert( boost::end( s ) == s.end() );
assert( boost::empty( s ) == s.empty() );
assert( boost::size( s ) == s.size() );
}