Compare commits

..

1 Commits

Author SHA1 Message Date
neilgroves
51fbb45ab5 Revert "irange: introduce one-parameter variant of irange" 2017-11-15 23:19:18 +00:00
133 changed files with 1623 additions and 1727 deletions

View File

@@ -1,668 +0,0 @@
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,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

View File

@@ -1,151 +0,0 @@
# Copyright 2016, 2017 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
language: cpp
sudo: false
python: "2.7"
branches:
only:
- master
- develop
- /feature\/.*/
env:
matrix:
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
compiler: g++
env: TOOLSET=gcc CXXSTD=03,11
- os: linux
compiler: g++-4.4
env: TOOLSET=gcc-4.4 CXXSTD=98,0x
addons:
apt:
packages:
- g++-4.4
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-4.6
env: TOOLSET=gcc-4.6 CXXSTD=03,0x
addons:
apt:
packages:
- g++-4.6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc-5 CXXSTD=03,11
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-5
env: TOOLSET=gcc-5 CXXSTD=14,1z
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc-6 CXXSTD=03,11
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc-6 CXXSTD=14,1z
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-7
env: TOOLSET=gcc-7 CXXSTD=03,11
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-7
env: TOOLSET=gcc-7 CXXSTD=14,17
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++
env: TOOLSET=clang CXXSTD=03,11
- os: linux
compiler: clang++
env: TOOLSET=clang CXXSTD=14,1z
addons:
apt:
packages:
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- os: osx
compiler: clang++
env: TOOLSET=clang CXXSTD=03,11
- os: osx
compiler: clang++
env: TOOLSET=clang CXXSTD=14,1z
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd ..
- git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- cp -r $TRAVIS_BUILD_DIR/* libs/range
- python tools/boostdep/depinst/depinst.py range
- ./bootstrap.sh
- ./b2 headers
script:
- ./b2 -j 3 libs/range/test toolset=$TOOLSET cxxstd=$CXXSTD
notifications:
email:
on_success: always

View File

@@ -1,41 +0,0 @@
# 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::static_assert
Boost::tuple
Boost::type_traits
Boost::utility
)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()

View File

@@ -1,37 +0,0 @@
# 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/static_assert//boost_static_assert
/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
;

View File

@@ -14,7 +14,7 @@
* [*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.
* [*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`.
[section:map_values_example map_values example]

View File

@@ -13,14 +13,14 @@ template<
class UnaryPredicate
>
typename range_iterator<ForwardRange>::type
remove_if(ForwardRange& rng, UnaryPredicate pred);
remove(ForwardRange& rng, UnaryPredicate pred);
template<
class ForwardRange,
class UnaryPredicate
>
typename range_iterator<const ForwardRange>::type
remove_if(const ForwardRange& rng, UnaryPredicate pred);
remove(const ForwardRange& rng, UnaryPredicate pred);
template<
range_return_value re,
@@ -28,7 +28,7 @@ template<
class UnaryPredicate
>
typename range_return<ForwardRange,re>::type
remove_if(ForwardRange& rng, UnaryPredicate pred);
remove(ForwardRange& rng, UnaryPredicate pred);
template<
range_return_value re,
@@ -36,7 +36,7 @@ template<
class UnaryPredicate
>
typename range_return<const ForwardRange,re>::type
remove_if(const ForwardRange& rng, UnaryPredicate pred);
remove(const ForwardRange& rng, UnaryPredicate pred);
``
[heading Description]

View File

@@ -19,11 +19,9 @@ bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred);
`is_sorted` determines if a range is sorted.
For the non-predicate version the return value is `true` if and only if for
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.
each adjacent elements `[x,y]` the expression `x < y` is `true`.
For the predicate version the return value is `true` is and only if for each
adjacent elements `[x, y]` the expression `pred(y, x)` is `false`, or if the
number of elements is zero or one.
adjacent elements `[x,y]` the expression `pred(x,y)` is `true`.
[heading Definition]

View File

@@ -10,11 +10,7 @@
``
template<class Integer>
iterator_range< range_detail::integer_iterator<Integer> >
irange(Integer last);
template<class Integer>
iterator_range< range_detail::integer_iterator<Integer> >
irange(Integer first, Integer last);
irange(Integer first, Integer last);
template<class Integer, class StepSize>
iterator_range< range_detail::integer_iterator_with_step<Integer, StepSize> >
@@ -41,3 +37,4 @@ Defined in the header file `boost/range/irange.hpp`
Constant. Since this function generates a new range the most significant performance cost is incurred through the iteration of the generated range.
[endsect]

View File

@@ -354,7 +354,7 @@ int main(int, const char*[])
char tc;
BOOST_FOREACH(boost::tie(ti, tc), boost::combine(v, l))
{
std::cout << '(' << ti << ',' << tc << ')' << '\n';
std::cout << '(' << ti << ',' << tv << ')' << '\n';
}
return 0;

View File

@@ -367,29 +367,4 @@ index(
} // namespace adaptors
} // namespace boost
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
namespace std {
#if defined(BOOST_CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmismatched-tags"
#endif
template<size_t N, class T, class Indexable>
struct tuple_element<N, boost::range::index_value<T, Indexable>>:
boost::tuples::element<N, boost::range::index_value<T, Indexable>> {};
template<class T, class Indexable>
struct tuple_size<boost::range::index_value<T, Indexable>>:
std::integral_constant<std::size_t, 2> {};
#if defined(BOOST_CLANG)
#pragma clang diagnostic pop
#endif
} // namespace std
#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE)
#endif // include guard

View File

@@ -15,7 +15,7 @@
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/reference.hpp>
#include <boost/range/concepts.hpp>
#include <boost/type_traits/declval.hpp>
#include <utility>
#if !defined(BOOST_NO_CXX11_DECLTYPE)
@@ -32,7 +32,7 @@ namespace boost
typedef BOOST_DEDUCED_TYPENAME
range_reference<SinglePassRange>::type argument_type;
typedef decltype( boost::declval<argument_type>().get() ) result_type;
using result_type = decltype(std::declval<argument_type>().get() );
result_type operator()( argument_type &&r ) const
{
@@ -46,11 +46,11 @@ namespace boost
: public transformed_range<unwrap_ref<SinglePassRange>,
SinglePassRange>
{
typedef transformed_range<unwrap_ref<SinglePassRange>,
SinglePassRange> base;
using base = transformed_range<unwrap_ref<SinglePassRange>,
SinglePassRange>;
public:
typedef unwrap_ref<SinglePassRange> transform_fn_type;
typedef SinglePassRange source_range_type;
using transform_fn_type = unwrap_ref<SinglePassRange>;
using source_range_type = SinglePassRange;
unwrap_ref_range(transform_fn_type fn, source_range_type &rng)
: base(fn, rng)

View File

@@ -15,7 +15,6 @@
#include <boost/range/size_type.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/range/concepts.hpp>
#include <boost/next_prior.hpp>
namespace boost
{

View File

@@ -14,7 +14,6 @@
#include <boost/range/adaptor/argument_fwd.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/iterator/enable_if_convertible.hpp>
#include <iterator>
namespace boost
@@ -67,7 +66,7 @@ namespace boost
template<class OtherIterator>
strided_iterator(
const strided_iterator<OtherIterator, Category>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0
@@ -111,7 +110,7 @@ namespace boost
template<class OtherIterator>
bool equal(
const strided_iterator<OtherIterator, Category>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0) const
@@ -178,7 +177,7 @@ namespace boost
OtherIterator,
bidirectional_traversal_tag
>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0
@@ -240,7 +239,7 @@ namespace boost
OtherIterator,
bidirectional_traversal_tag
>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0) const
@@ -309,7 +308,7 @@ namespace boost
OtherIterator,
random_access_traversal_tag
>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator,
base_iterator
>::type* = 0
@@ -373,7 +372,7 @@ namespace boost
OtherIterator,
random_access_traversal_tag
>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator, base_iterator>::type* = 0) const
{
BOOST_ASSERT((other.m_index - m_index) % m_stride == difference_type());
@@ -386,7 +385,7 @@ namespace boost
OtherIterator,
random_access_traversal_tag
>& other,
typename iterators::enable_if_convertible<
typename enable_if_convertible<
OtherIterator, base_iterator>::type* = 0) const
{
return m_index == other.m_index;

View File

@@ -13,8 +13,8 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/core/ref.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/ref.hpp>
#include <algorithm>
#if BOOST_WORKAROUND(BOOST_MSVC, == 1600)

View File

@@ -31,7 +31,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
lower_bound( ForwardRange& rng, const Value& val )
lower_bound( ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val);
@@ -40,7 +40,7 @@ lower_bound( ForwardRange& rng, const Value& val )
/// \overload
template< class ForwardRange, class Value >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
lower_bound( const ForwardRange& rng, const Value& val )
lower_bound( const ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val);
@@ -52,7 +52,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
@@ -61,7 +61,7 @@ lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
/// \overload
template< class ForwardRange, class Value, class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
lower_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
@@ -73,7 +73,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
lower_bound( ForwardRange& rng, const Value& val )
lower_bound( ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@@ -84,7 +84,7 @@ lower_bound( ForwardRange& rng, const Value& val )
/// \overload
template< range_return_value re, class ForwardRange, class Value >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
lower_bound( const ForwardRange& rng, const Value& val )
lower_bound( const ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::
@@ -98,7 +98,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@@ -109,7 +109,7 @@ lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
/// \overload
template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
lower_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
lower_bound( const ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::

View File

@@ -3,18 +3,17 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Copyright 2019 Glen Joseph Fernandes (glenjofe@gmail.com)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED
#define BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED
#include <boost/algorithm/minmax_element.hpp>
#include <boost/concept_check.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/detail/less.hpp>
#include <boost/range/detail/range_return.hpp>
namespace boost
@@ -22,27 +21,6 @@ namespace boost
namespace range
{
namespace detail
{
template<typename Iterator, class Predicate>
inline Iterator
max_element(Iterator first, Iterator last, Predicate comp)
{
if (first == last) {
return last;
}
Iterator result = first;
while (++first != last) {
if (comp(*result, *first)) {
result = first;
}
}
return result;
}
} // namespace detail
/// \brief template function max_element
///
/// range-based version of the max_element std algorithm
@@ -54,7 +32,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
max_element(ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return detail::max_element(boost::begin(rng), boost::end(rng), detail::less());
return boost::first_max_element(boost::begin(rng), boost::end(rng));
}
/// \overload
@@ -63,7 +41,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
max_element(const ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return detail::max_element(boost::begin(rng), boost::end(rng), detail::less());
return boost::first_max_element(boost::begin(rng), boost::end(rng));
}
/// \overload
@@ -72,7 +50,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
max_element(ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return detail::max_element(boost::begin(rng), boost::end(rng), pred);
return boost::first_max_element(boost::begin(rng), boost::end(rng), pred);
}
/// \overload
@@ -81,7 +59,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
max_element(const ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return detail::max_element(boost::begin(rng), boost::end(rng), pred);
return boost::first_max_element(boost::begin(rng), boost::end(rng), pred);
}
// range_return overloads
@@ -93,7 +71,7 @@ max_element(ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::pack(
detail::max_element(boost::begin(rng), boost::end(rng), detail::less()),
boost::first_max_element(boost::begin(rng), boost::end(rng)),
rng);
}
@@ -104,7 +82,7 @@ max_element(const ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::pack(
detail::max_element(boost::begin(rng), boost::end(rng), detail::less()),
boost::first_max_element(boost::begin(rng), boost::end(rng)),
rng);
}
@@ -115,7 +93,7 @@ max_element(ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::pack(
detail::max_element(boost::begin(rng), boost::end(rng), pred),
boost::first_max_element(boost::begin(rng), boost::end(rng), pred),
rng);
}
@@ -126,7 +104,7 @@ max_element(const ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::pack(
detail::max_element(boost::begin(rng), boost::end(rng), pred),
boost::first_max_element(boost::begin(rng), boost::end(rng), pred),
rng);
}

View File

@@ -3,18 +3,17 @@
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Copyright 2019 Glen Joseph Fernandes (glenjofe@gmail.com)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED
#define BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED
#include <boost/algorithm/minmax_element.hpp>
#include <boost/concept_check.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/detail/less.hpp>
#include <boost/range/detail/range_return.hpp>
namespace boost
@@ -22,27 +21,6 @@ namespace boost
namespace range
{
namespace detail
{
template<typename Iterator, class Predicate>
inline Iterator
min_element(Iterator first, Iterator last, Predicate comp)
{
if (first == last) {
return last;
}
Iterator result = first;
while (++first != last) {
if (comp(*first, *result)) {
result = first;
}
}
return result;
}
} // namespace detail
/// \brief template function min_element
///
/// range-based version of the min_element std algorithm
@@ -54,7 +32,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
min_element(ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return detail::min_element(boost::begin(rng), boost::end(rng), detail::less());
return boost::first_min_element(boost::begin(rng), boost::end(rng));
}
/// \overload
@@ -63,7 +41,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
min_element(const ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return detail::min_element(boost::begin(rng), boost::end(rng), detail::less());
return boost::first_min_element(boost::begin(rng), boost::end(rng));
}
/// \overload
@@ -72,7 +50,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
min_element(ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return detail::min_element(boost::begin(rng), boost::end(rng), pred);
return boost::first_min_element(boost::begin(rng), boost::end(rng), pred);
}
/// \overload
@@ -81,7 +59,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
min_element(const ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return detail::min_element(boost::begin(rng), boost::end(rng), pred);
return boost::first_min_element(boost::begin(rng), boost::end(rng), pred);
}
// range_return overloads
@@ -93,7 +71,7 @@ min_element(ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::pack(
detail::min_element(boost::begin(rng), boost::end(rng), detail::less()),
boost::first_min_element(boost::begin(rng), boost::end(rng)),
rng);
}
@@ -104,7 +82,7 @@ min_element(const ForwardRange& rng)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::pack(
detail::min_element(boost::begin(rng), boost::end(rng), detail::less()),
boost::first_min_element(boost::begin(rng), boost::end(rng)),
rng);
}
@@ -115,7 +93,7 @@ min_element(ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::pack(
detail::min_element(boost::begin(rng), boost::end(rng), pred),
boost::first_min_element(boost::begin(rng), boost::end(rng), pred),
rng);
}
@@ -126,7 +104,7 @@ min_element(const ForwardRange& rng, BinaryPredicate pred)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::pack(
detail::min_element(boost::begin(rng), boost::end(rng), pred),
boost::first_min_element(boost::begin(rng), boost::end(rng), pred),
rng);
}

View File

@@ -32,12 +32,12 @@ struct wrap_rand
{
typedef unsigned int result_type;
static BOOST_CONSTEXPR result_type (min)()
static result_type (min)()
{
return 0;
}
static BOOST_CONSTEXPR result_type (max)()
static result_type (max)()
{
return RAND_MAX;
}
@@ -64,12 +64,12 @@ struct wrap_generator
wrap_generator(Generator& gen) : g(gen) {}
static BOOST_CONSTEXPR result_type (min)()
static result_type (min)()
{
return 0;
}
static BOOST_CONSTEXPR result_type (max)()
static result_type (max)()
{
return max_arg - 1;
}

View File

@@ -32,7 +32,7 @@ BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
upper_bound( ForwardRange& rng, const Value& val )
upper_bound( ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val);
@@ -41,7 +41,7 @@ upper_bound( ForwardRange& rng, const Value& val )
/// \overload
template< class ForwardRange, class Value >
BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
upper_bound( const ForwardRange& rng, const Value& val )
upper_bound( const ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val);
@@ -53,7 +53,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
>::type
upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
@@ -62,7 +62,7 @@ upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
/// \overload
template< class ForwardRange, class Value, class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
upper_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
@@ -74,7 +74,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
upper_bound( ForwardRange& rng, const Value& val )
upper_bound( ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@@ -85,7 +85,7 @@ upper_bound( ForwardRange& rng, const Value& val )
/// \overload
template< range_return_value re, class ForwardRange, class Value >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
upper_bound( const ForwardRange& rng, const Value& val )
upper_bound( const ForwardRange& rng, Value val )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::
@@ -100,7 +100,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if<
is_const<ForwardRange>,
BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
>::type
upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
return range_return<ForwardRange,re>::
@@ -112,7 +112,7 @@ upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred )
template< range_return_value re, class ForwardRange, class Value,
class SortPredicate >
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
upper_bound( const ForwardRange& rng, const Value& val, SortPredicate pred )
upper_bound( const ForwardRange& rng, Value val, SortPredicate pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
return range_return<const ForwardRange,re>::

View File

@@ -52,31 +52,10 @@ inline Container& remove_erase_if( Container& on, Pred pred )
return on;
}
template< class Container >
inline Container& unique_erase( Container& on)
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
on.erase(
std::unique(boost::begin(on), boost::end(on)),
boost::end(on));
return on;
}
template< class Container, class Pred >
inline Container& unique_erase( Container& on, Pred pred )
{
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
on.erase(
std::unique(boost::begin(on), boost::end(on), pred),
boost::end(on));
return on;
}
} // namespace range
using range::erase;
using range::remove_erase;
using range::remove_erase_if;
using range::unique_erase;
} // namespace boost
#endif // include guard

View File

@@ -20,9 +20,37 @@
namespace boost
{
namespace range
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
namespace range_detail
{
template < class Container, class Range >
inline Container& push_back_impl( Container& on, Range&& from, std::false_type)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> ));
BOOST_ASSERT_MSG(!range_detail::is_same_object(on, from),
"cannot move from a container to itself");
on.insert( on.end(),
std::make_move_iterator(boost::begin(from)),
std::make_move_iterator(boost::end(from)));
return on;
}
template < class Container, class Range >
inline Container& push_back_impl( Container& on, const Range& from, std::true_type)
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> ));
BOOST_ASSERT_MSG(!range_detail::is_same_object(on, from),
"cannot copy from a container to itself");
on.insert( on.end(), boost::begin(from), boost::end(from));
return on;
}
} //namespace range_detail
#endif
namespace range {
#if defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template< class Container, class Range >
inline Container& push_back( Container& on, const Range& from )
{
@@ -34,6 +62,19 @@ inline Container& push_back( Container& on, const Range& from )
return on;
}
#else
template< class Container, class Range >
inline Container& push_back( Container& on, Range&& from )
{
BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> ));
range_detail::push_back_impl(on,
std::forward<Range>(from),
std::is_lvalue_reference<Range>() );
return on;
}
#endif
} // namespace range
using range::push_back;
} // namespace boost

View File

@@ -10,8 +10,6 @@
#define BOOST_RANGE_ANY_RANGE_HPP_INCLUDED
#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_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>

View File

@@ -28,6 +28,8 @@ namespace boost
return boost::make_iterator_range( r );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class Range >
inline boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
as_array( const Range& r )
@@ -35,6 +37,8 @@ namespace boost
return boost::make_iterator_range( r );
}
#endif
}
#endif

View File

@@ -15,6 +15,10 @@
# pragma once
#endif
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/as_literal.hpp>
#else
#include <boost/range/iterator_range.hpp>
#include <boost/range/detail/str_types.hpp>
@@ -161,4 +165,6 @@ namespace boost
}
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#endif

View File

@@ -17,14 +17,16 @@
#include <boost/range/config.hpp>
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/begin.hpp>
#else
#include <boost/range/iterator.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
namespace boost
{
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
namespace range_detail
{
#endif
@@ -81,7 +83,7 @@ namespace range_detail
}
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
} // namespace 'range_detail'
#endif
@@ -92,24 +94,18 @@ namespace range_adl_barrier
{
template< class T >
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
{
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_begin( r );
}
template< class T >
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
{
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_begin( r );
@@ -118,6 +114,8 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
} // namespace range_adl_barrier
} // namespace boost
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace boost
{
namespace range_adl_barrier

View File

@@ -23,9 +23,7 @@
#include <boost/range/iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/detail/misc_concept.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <iterator>
@@ -86,7 +84,7 @@ namespace boost {
#endif
#endif
#ifdef BOOST_BORLANDC
#ifdef __BORLANDC__
#define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
#endif
@@ -254,7 +252,7 @@ namespace boost {
n = i - j;
}
private:
BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept<Iterator>::difference_type n;
BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n;
Iterator i;
Iterator j;
#endif

View File

@@ -23,7 +23,7 @@
#error "macro already defined!"
#endif
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# define BOOST_RANGE_DEDUCED_TYPENAME typename
#else
#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME

View File

@@ -15,10 +15,6 @@
# pragma once
#endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/range/reverse_iterator.hpp>")
#include <boost/range/reverse_iterator.hpp>
#include <boost/type_traits/remove_reference.hpp>

View File

@@ -13,7 +13,6 @@
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_reference.hpp>
@@ -21,7 +20,7 @@
#include <boost/range/detail/any_iterator_buffer.hpp>
#include <boost/range/detail/any_iterator_interface.hpp>
#include <boost/range/detail/any_iterator_wrapper.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost
{

View File

@@ -13,7 +13,7 @@
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/core/noncopyable.hpp>
#include <boost/noncopyable.hpp>
namespace boost
{

View File

@@ -10,11 +10,10 @@
#ifndef 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/iterator/iterator_categories.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
@@ -36,16 +35,15 @@ namespace boost
};
template<class T>
struct reference_as_value_type_generator
struct mutable_reference_type_generator
{
typedef typename remove_reference<
typename remove_const<T>::type
>::type value_type;
typedef typename mpl::if_<
typename is_convertible<const value_type&, value_type>::type,
value_type,
T
typename mpl::and_<
typename is_const<T>::type,
typename mpl::not_<typename is_reference<T>::type>::type
>::type,
T,
typename add_reference<T>::type
>::type type;
};
@@ -55,12 +53,16 @@ namespace boost
>
struct any_incrementable_iterator_interface
{
typedef Reference reference;
typedef typename mutable_reference_type_generator<
Reference
>::type reference;
typedef typename const_reference_type_generator<
Reference
>::type const_reference;
typedef typename reference_as_value_type_generator<
Reference
typedef typename remove_const<
typename remove_reference<Reference>::type
>::type reference_as_value_type;
typedef Buffer buffer_type;

View File

@@ -10,7 +10,7 @@
#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED
#define BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED
#include <boost/polymorphic_cast.hpp>
#include <boost/cast.hpp>
#include <boost/range/config.hpp>
#include <boost/range/detail/any_iterator_interface.hpp>
#include <boost/range/concepts.hpp>

View File

@@ -0,0 +1,33 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2006. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP
#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP
#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/range/detail/detail_str.hpp>
#include <boost/range/iterator_range.hpp>
namespace boost
{
template< class Range >
inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
as_literal( Range& r )
{
return ::boost::make_iterator_range( ::boost::range_detail::str_begin(r),
::boost::range_detail::str_end(r) );
}
}
#endif

View File

@@ -0,0 +1,83 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP
#define BOOST_RANGE_DETAIL_BEGIN_HPP
#include <boost/config.hpp> // BOOST_MSVC
#include <boost/detail/workaround.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/detail/common.hpp>
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_begin;
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
template<>
struct range_begin<std_container_>
{
template< typename C >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
{
return c.begin();
};
};
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
template<>
struct range_begin<std_pair_>
{
template< typename P >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
{
return p.first;
}
};
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
template<>
struct range_begin<array_>
{
template<typename T>
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
{
return t;
}
};
} // namespace 'range_detail'
namespace range_adl_barrier
{
template< typename C >
BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
begin( C& c )
{
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
}
} // namespace 'boost'
#endif

View File

@@ -187,6 +187,8 @@ namespace boost {
return collection_traits<C>::function_type::empty( c );
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//! Free-standing begin() function
/*!
Get the begin iterator of the container. Uses collection_traits.
@@ -231,6 +233,32 @@ namespace boost {
return collection_traits<C>::function_type::end( c );
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//! Free-standing begin() function
/*!
\overload
*/
template< typename C >
inline typename collection_traits<C>::result_iterator
begin( C& c )
{
return collection_traits<C>::function_type::begin( c );
}
//! Free-standing end() function
/*!
\overload
*/
template< typename C >
inline typename collection_traits<C>::result_iterator
end( C& c )
{
return collection_traits<C>::function_type::end( c );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
} // namespace algorithm
} // namespace boost

View File

@@ -12,15 +12,17 @@
#include <cstddef>
#include <string>
#include <utility>
#include <iterator>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/detail/iterator.hpp>
// Container traits implementation ---------------------------------------------------------
@@ -34,7 +36,7 @@ namespace boost {
/*
Wraps std::container compliant containers
*/
template< typename ContainerT >
template< typename ContainerT >
struct default_container_traits
{
typedef typename ContainerT::value_type value_type;
@@ -47,7 +49,7 @@ namespace boost {
>::type result_iterator;
typedef typename ContainerT::difference_type difference_type;
typedef typename ContainerT::size_type size_type;
// static operations
template< typename C >
static size_type size( const C& c )
@@ -61,6 +63,8 @@ namespace boost {
return c.empty();
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename C >
static iterator begin( C& c )
{
@@ -85,6 +89,22 @@ namespace boost {
return c.end();
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename C >
static result_iterator begin( C& c )
{
return c.begin();
}
template< typename C >
static result_iterator end( C& c )
{
return c.end();
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
};
template<typename T>
@@ -118,11 +138,11 @@ namespace boost {
{
typedef typename PairT::first_type element_type;
typedef typename
std::iterator_traits<element_type>::value_type value_type;
typedef typename ::boost::detail::
iterator_traits<element_type>::value_type value_type;
typedef std::size_t size_type;
typedef typename
std::iterator_traits<element_type>::difference_type difference_type;
typedef typename ::boost::detail::
iterator_traits<element_type>::difference_type difference_type;
typedef element_type iterator;
typedef element_type const_iterator;
@@ -184,7 +204,7 @@ namespace boost {
BOOST_STATIC_CONSTANT( size_type, array_size = sz );
};
// array length resolving
/*
Lenght of string contained in a static array could
@@ -241,7 +261,7 @@ namespace boost {
else
return std::char_traits<char>::length(a);
}
template< typename A >
static bool empty( const A& a )
{
@@ -301,7 +321,7 @@ namespace boost {
const_iterator,
iterator
>::type result_iterator;
private:
// resolve array size
typedef typename
@@ -325,7 +345,9 @@ namespace boost {
{
return array_length_type::empty(a);
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename A >
static iterator begin( A& a )
@@ -351,6 +373,22 @@ namespace boost {
return a+array_length_type::length(a);
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename A >
static result_iterator begin( A& a )
{
return a;
}
template< typename A >
static result_iterator end( A& a )
{
return a+array_length_type::length(a);
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
};
template<typename T>
@@ -398,6 +436,8 @@ namespace boost {
return p==0 || p[0]==0;
}
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename P >
static iterator begin( P& p )
{
@@ -428,6 +468,24 @@ namespace boost {
return p+char_traits::length(p);
}
#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename P >
static result_iterator begin( P& p )
{
return p;
}
template< typename P >
static result_iterator end( P& p )
{
if ( p==0 )
return p;
else
return p+char_traits::length(p);
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
};
template<typename T>

View File

@@ -23,20 +23,68 @@
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/arithmetic/div.hpp>
#include <boost/preprocessor/arithmetic/mul.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/control.hpp>
#include <boost/preprocessor/control/while.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/facilities/identity.hpp>
#include <boost/preprocessor/iteration/local.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/punctuation/comma.hpp>
#include <boost/preprocessor/repetition.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/utility/result_of.hpp>
#include <vector>
#include <list>
namespace boost
{
namespace range_detail
{
template<typename F, typename T, int SIZE>
struct combined_result_impl;
template<typename F, typename T>
struct combined_result
: combined_result_impl<F, T, tuples::length<T>::value>
{
};
#define BOOST_RANGE_combined_element(z, n, data) \
typename tuples::element<n, T>::type
#define BOOST_RANGE_combined_result(z, n, data) \
template<typename F, typename T> \
struct combined_result_impl <F,T,n> \
: result_of<F(BOOST_PP_ENUM(n, BOOST_RANGE_combined_element, ~))> \
{ \
};
#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_result(~,n,~)
#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \
BOOST_RANGE_MAX_COMBINE_ARGS)
#include BOOST_PP_LOCAL_ITERATE()
#define BOOST_RANGE_combined_get(z, n, data) get<n>(tuple)
#define BOOST_RANGE_combined_unpack(z, n, data) \
template<typename F, typename T> inline \
typename combined_result<F,T>::type \
unpack_(mpl::int_<n>, F f, const T& tuple) \
{ \
return f(BOOST_PP_ENUM(n, BOOST_RANGE_combined_get, ~)); \
}
#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_unpack(~,n,~)
#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \
BOOST_RANGE_MAX_COMBINE_ARGS)
#include BOOST_PP_LOCAL_ITERATE()
} // namespace range_detail
namespace range
{
@@ -66,6 +114,10 @@ namespace range
#endif // include guard
#undef BOOST_RANGE_combined_element
#undef BOOST_RANGE_combined_result
#undef BOOST_RANGE_combined_get
#undef BOOST_RANGE_combined_unpack
#undef BOOST_RANGE_combined_seq
#undef BOOST_RANGE_combined_exp_pred
#undef BOOST_RANGE_combined_exp_op

View File

@@ -15,6 +15,8 @@
#include <boost/range/end.hpp>
#include <boost/iterator/zip_iterator.hpp>
#include <fstream>
namespace boost
{
namespace range

View File

@@ -0,0 +1,376 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_DETAIL_STR_HPP
#define BOOST_RANGE_DETAIL_DETAIL_STR_HPP
#include <boost/config.hpp> // BOOST_MSVC
#include <boost/range/iterator.hpp>
namespace boost
{
namespace range_detail
{
//
// iterator
//
template<>
struct range_iterator_<char_array_>
{
template< typename T >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME
remove_extent<T>::type* type;
};
};
template<>
struct range_iterator_<char_ptr_>
{
template< typename S >
struct pts
{
typedef char* type;
};
};
template<>
struct range_iterator_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef const char* type;
};
};
template<>
struct range_iterator_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef wchar_t* type;
};
};
template<>
struct range_iterator_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t* type;
};
};
//
// const iterator
//
template<>
struct range_const_iterator_<char_array_>
{
template< typename T >
struct pts
{
typedef const BOOST_RANGE_DEDUCED_TYPENAME
remove_extent<T>::type* type;
};
};
template<>
struct range_const_iterator_<char_ptr_>
{
template< typename S >
struct pts
{
typedef const char* type;
};
};
template<>
struct range_const_iterator_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef const char* type;
};
};
template<>
struct range_const_iterator_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t* type;
};
};
template<>
struct range_const_iterator_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t* type;
};
};
}
}
#include <boost/range/detail/begin.hpp>
#include <boost/range/detail/end.hpp>
#include <boost/range/detail/size_type.hpp>
#include <boost/range/detail/value_type.hpp>
#include <boost/range/detail/common.hpp>
namespace boost
{
namespace range_detail
{
//
// str_begin()
//
template<>
struct range_begin<char_ptr_>
{
static char* fun( char* s )
{
return s;
}
};
template<>
struct range_begin<const_char_ptr_>
{
static const char* fun( const char* s )
{
return s;
}
};
template<>
struct range_begin<wchar_t_ptr_>
{
static wchar_t* fun( wchar_t* s )
{
return s;
}
};
template<>
struct range_begin<const_wchar_t_ptr_>
{
static const wchar_t* fun( const wchar_t* s )
{
return s;
}
};
template< typename C >
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
str_begin( C& c )
{
return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME
range_detail::range<C>::type >::fun( c );
}
//
// str_end()
//
template<>
struct range_end<char_array_>
{
template< typename T, std::size_t sz >
static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return boost::range_detail::array_end( boost_range_array );
}
};
template<>
struct range_end<wchar_t_array_>
{
template< typename T, std::size_t sz >
static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
{
return boost::range_detail::array_end( boost_range_array );
}
};
template<>
struct range_end<char_ptr_>
{
static char* fun( char* s )
{
return boost::range_detail::str_end( s );
}
};
template<>
struct range_end<const_char_ptr_>
{
static const char* fun( const char* s )
{
return boost::range_detail::str_end( s );
}
};
template<>
struct range_end<wchar_t_ptr_>
{
static wchar_t* fun( wchar_t* s )
{
return boost::range_detail::str_end( s );
}
};
template<>
struct range_end<const_wchar_t_ptr_>
{
static const wchar_t* fun( const wchar_t* s )
{
return boost::range_detail::str_end( s );
}
};
template< typename C >
inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
str_end( C& c )
{
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME
range_detail::range<C>::type >::fun( c );
}
//
// size_type
//
template<>
struct range_size_type_<char_array_>
{
template< typename A >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<char_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef std::size_t type;
};
};
//
// value_type
//
template<>
struct range_value_type_<char_array_>
{
template< typename T >
struct pts
{
typedef char type;
};
};
template<>
struct range_value_type_<char_ptr_>
{
template< typename S >
struct pts
{
typedef char type;
};
};
template<>
struct range_value_type_<const_char_ptr_>
{
template< typename S >
struct pts
{
typedef const char type;
};
};
template<>
struct range_value_type_<wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef wchar_t type;
};
};
template<>
struct range_value_type_<const_wchar_t_ptr_>
{
template< typename S >
struct pts
{
typedef const wchar_t type;
};
};
} // namespace 'range_detail'
} // namespace 'boost'
#endif

View File

@@ -0,0 +1,86 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_END_HPP
#define BOOST_RANGE_DETAIL_END_HPP
#include <boost/config.hpp> // BOOST_MSVC
#include <boost/detail/workaround.hpp>
#include <boost/range/detail/implementation_help.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/detail/common.hpp>
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_end;
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
template<>
struct range_end<std_container_>
{
template< typename C >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
fun( C& c )
{
return c.end();
};
};
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
template<>
struct range_end<std_pair_>
{
template< typename P >
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
fun( const P& p )
{
return p.second;
}
};
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
template<>
struct range_end<array_>
{
template<typename T>
BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
{
return t + remove_extent<T>::size;
}
};
} // namespace 'range_detail'
namespace range_adl_barrier
{
template< typename C >
BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
end( C& c )
{
return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
} // namespace range_adl_barrier
} // namespace 'boost'
#endif

View File

@@ -13,7 +13,6 @@
#include <boost/type_traits/is_class.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/cstdint.hpp>

View File

@@ -19,7 +19,6 @@
#include <iterator>
#include <boost/assert.hpp>
#include <boost/mpl/if.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/range/begin.hpp>

View File

@@ -1,26 +0,0 @@
/*
Copyright 2019 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_RANGE_DETAIL_LESS
#define BOOST_RANGE_DETAIL_LESS
namespace boost {
namespace range {
namespace detail {
struct less {
template<class T, class U>
bool operator()(const T& lhs, const U& rhs) const {
return lhs < rhs;
}
};
} /* detail */
} /* range */
} /* boost */
#endif

View File

@@ -56,9 +56,8 @@
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/core/addressof.hpp>
#include <boost/core/enable_if.hpp> // disable_if
#include <boost/next_prior.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/utility/enable_if.hpp> // disable_if
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
#include <boost/range/mutable_iterator.hpp>

View File

@@ -20,8 +20,6 @@
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
#include <boost/mpl/bool.hpp>
namespace boost
{
namespace cb_details

View File

@@ -12,7 +12,6 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/next_prior.hpp>
namespace boost
{

View File

@@ -0,0 +1,157 @@
// Boost.Range library
//
// Copyright Jonathan Turkanis 2005. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
#include <boost/config.hpp> // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std.
#include <cstddef>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost
{
namespace range_detail
{
template< typename Case1 = mpl::true_,
typename Type1 = mpl::void_,
typename Case2 = mpl::true_,
typename Type2 = mpl::void_,
typename Case3 = mpl::true_,
typename Type3 = mpl::void_,
typename Case4 = mpl::true_,
typename Type4 = mpl::void_,
typename Case5 = mpl::true_,
typename Type5 = mpl::void_,
typename Case6 = mpl::true_,
typename Type6 = mpl::void_,
typename Case7 = mpl::true_,
typename Type7 = mpl::void_,
typename Case8 = mpl::true_,
typename Type8 = mpl::void_,
typename Case9 = mpl::true_,
typename Type9 = mpl::void_,
typename Case10 = mpl::true_,
typename Type10 = mpl::void_,
typename Case11 = mpl::true_,
typename Type11 = mpl::void_,
typename Case12 = mpl::true_,
typename Type12 = mpl::void_,
typename Case13 = mpl::true_,
typename Type13 = mpl::void_,
typename Case14 = mpl::true_,
typename Type14 = mpl::void_,
typename Case15 = mpl::true_,
typename Type15 = mpl::void_,
typename Case16 = mpl::true_,
typename Type16 = mpl::void_,
typename Case17 = mpl::true_,
typename Type17 = mpl::void_,
typename Case18 = mpl::true_,
typename Type18 = mpl::void_,
typename Case19 = mpl::true_,
typename Type19 = mpl::void_,
typename Case20 = mpl::true_,
typename Type20 = mpl::void_>
struct select {
typedef typename
mpl::eval_if<
Case1, mpl::identity<Type1>, mpl::eval_if<
Case2, mpl::identity<Type2>, mpl::eval_if<
Case3, mpl::identity<Type3>, mpl::eval_if<
Case4, mpl::identity<Type4>, mpl::eval_if<
Case5, mpl::identity<Type5>, mpl::eval_if<
Case6, mpl::identity<Type6>, mpl::eval_if<
Case7, mpl::identity<Type7>, mpl::eval_if<
Case8, mpl::identity<Type8>, mpl::eval_if<
Case9, mpl::identity<Type9>, mpl::if_<
Case10, Type10, mpl::void_ > > > > > > > > >
>::type result1;
typedef typename
mpl::eval_if<
Case11, mpl::identity<Type11>, mpl::eval_if<
Case12, mpl::identity<Type12>, mpl::eval_if<
Case13, mpl::identity<Type13>, mpl::eval_if<
Case14, mpl::identity<Type14>, mpl::eval_if<
Case15, mpl::identity<Type15>, mpl::eval_if<
Case16, mpl::identity<Type16>, mpl::eval_if<
Case17, mpl::identity<Type17>, mpl::eval_if<
Case18, mpl::identity<Type18>, mpl::eval_if<
Case19, mpl::identity<Type19>, mpl::if_<
Case20, Type20, mpl::void_ > > > > > > > > >
> result2;
typedef typename
mpl::eval_if<
is_same<result1, mpl::void_>,
result2,
mpl::identity<result1>
>::type type;
};
template<typename T>
struct remove_extent {
static T* ar;
BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0]));
typedef typename
select<
is_same<T, bool[size]>, bool,
is_same<T, char[size]>, char,
is_same<T, signed char[size]>, signed char,
is_same<T, unsigned char[size]>, unsigned char,
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
is_same<T, wchar_t[size]>, wchar_t,
#endif
is_same<T, short[size]>, short,
is_same<T, unsigned short[size]>, unsigned short,
is_same<T, int[size]>, int,
is_same<T, unsigned int[size]>, unsigned int,
is_same<T, long[size]>, long,
is_same<T, unsigned long[size]>, unsigned long,
is_same<T, float[size]>, float,
is_same<T, double[size]>, double,
is_same<T, long double[size]>, long double
>::type result1;
typedef typename
select<
is_same<T, const bool[size]>, const bool,
is_same<T, const char[size]>, const char,
is_same<T, const signed char[size]>, const signed char,
is_same<T, const unsigned char[size]>, const unsigned char,
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
is_same<T, const wchar_t[size]>, const wchar_t,
#endif
is_same<T, const short[size]>, const short,
is_same<T, const unsigned short[size]>, const unsigned short,
is_same<T, const int[size]>, const int,
is_same<T, const unsigned int[size]>, const unsigned int,
is_same<T, const long[size]>, const long,
is_same<T, const unsigned long[size]>, const unsigned long,
is_same<T, const float[size]>, const float,
is_same<T, const double[size]>, const double,
is_same<T, const long double[size]>, const long double
> result2;
typedef typename
mpl::eval_if<
is_same<result1, mpl::void_>,
result2,
mpl::identity<result1>
>::type type;
};
} // namespace 'range_detail'
} // namespace 'boost'
#endif

View File

@@ -0,0 +1,55 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
#include <boost/range/detail/common.hpp>
//////////////////////////////////////////////////////////////////////////////
// missing partial specialization workaround.
//////////////////////////////////////////////////////////////////////////////
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_size_type_
{
template< typename C >
struct pts
{
typedef std::size_t type;
};
};
template<>
struct range_size_type_<std_container_>
{
template< typename C >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
};
};
}
template< typename C >
class range_size
{
typedef typename range_detail::range<C>::type c_type;
public:
typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
};
}
#endif

View File

@@ -0,0 +1,72 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP
#include <boost/range/detail/common.hpp>
#include <boost/range/detail/remove_extent.hpp>
#include <boost/iterator/iterator_traits.hpp>
//////////////////////////////////////////////////////////////////////////////
// missing partial specialization workaround.
//////////////////////////////////////////////////////////////////////////////
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_value_type_;
template<>
struct range_value_type_<std_container_>
{
template< typename C >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type;
};
};
template<>
struct range_value_type_<std_pair_>
{
template< typename P >
struct pts
{
typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type;
};
};
template<>
struct range_value_type_<array_>
{
template< typename T >
struct pts
{
typedef BOOST_DEDUCED_TYPENAME remove_extent<T>::type type;
};
};
}
template< typename C >
class range_value
{
typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
public:
typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
};
}
#endif

View File

@@ -23,18 +23,13 @@
namespace boost
{
namespace range_distance_adl_barrier
template< class T >
inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
distance( const T& r )
{
template< class T >
inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
distance( const T& r )
{
return boost::iterators::distance( boost::begin( r ), boost::end( r ) );
}
return boost::distance( boost::begin( r ), boost::end( r ) );
}
using namespace range_distance_adl_barrier;
} // namespace 'boost'
#endif

View File

@@ -17,16 +17,18 @@
#include <boost/range/config.hpp>
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/end.hpp>
#else
#include <boost/range/detail/implementation_help.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/const_iterator.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
namespace boost
{
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
namespace range_detail
{
#endif
@@ -78,7 +80,7 @@ namespace range_detail
return range_detail::array_end<T,sz>( a );
}
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
} // namespace 'range_detail'
#endif
@@ -86,24 +88,18 @@ namespace range_adl_barrier
{
template< class T >
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
{
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_end( r );
}
template< class T >
#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
BOOST_CONSTEXPR
#endif
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
{
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_end( r );
@@ -112,6 +108,8 @@ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
} // namespace range_adl_barrier
} // namespace 'boost'
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace boost
{
namespace range_adl_barrier

View File

@@ -18,7 +18,7 @@
#include <boost/mpl/has_xxx.hpp>
#include <boost/range/iterator.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost
{

View File

@@ -203,6 +203,22 @@ namespace boost
}
};
template<typename Integer>
integer_range<Integer>
irange(int last)
{
BOOST_ASSERT( 0 <= last );
return integer_range<Integer>(0, last);
}
template<typename Integer>
integer_range<Integer>
irange(int first, int last)
{
BOOST_ASSERT( first <= last );
return integer_range<Integer>(first, last);
}
template<typename Integer>
integer_range<Integer>
irange(Integer first, Integer last)
@@ -217,7 +233,7 @@ namespace boost
{
BOOST_ASSERT( step_size != 0 );
BOOST_ASSERT( (step_size > 0) ? (last >= first) : (last <= first) );
typedef typename range_detail::integer_iterator_with_step<Integer> iterator_t;
const std::ptrdiff_t sz = static_cast<std::ptrdiff_t>(step_size >= 0 ? step_size : -step_size);
@@ -225,19 +241,12 @@ namespace boost
const Integer f = step_size >= 0 ? first : last;
const std::ptrdiff_t num_steps = (l - f) / sz + ((l - f) % sz ? 1 : 0);
BOOST_ASSERT(num_steps >= 0);
return strided_integer_range<Integer>(
iterator_t(first, 0, step_size),
iterator_t(first, num_steps, step_size));
}
template<typename Integer>
integer_range<Integer>
irange(Integer last)
{
return integer_range<Integer>(static_cast<Integer>(0), last);
}
} // namespace boost
#endif // include guard

View File

@@ -22,7 +22,6 @@
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
namespace boost
{

View File

@@ -26,11 +26,8 @@
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_abstract.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
@@ -44,8 +41,7 @@
#include <boost/range/has_range_iterator.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/detail/safe_bool.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/next_prior.hpp>
#include <boost/utility/enable_if.hpp>
#include <iterator>
#include <algorithm>
#include <cstddef>
@@ -640,6 +636,8 @@ public:
return iterator_range_detail::greater_or_equal_than( l, r );
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#else
template< class Iterator1T, class Iterator2T >
inline bool
operator==( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r )
@@ -744,6 +742,8 @@ public:
return iterator_range_detail::greater_or_equal_than( l, r );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
// iterator range utilities -----------------------------------------//
//! iterator_range construct helper
@@ -768,6 +768,17 @@ public:
return iterator_range<IteratorT>(first, boost::next(first, n));
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< typename Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
make_iterator_range( Range& r )
{
return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
( boost::begin( r ), boost::end( r ) );
}
#else
//! iterator_range construct helper
/*!
Construct an \c iterator_range from a \c Range containing the begin
@@ -789,6 +800,8 @@ public:
( r, iterator_range_detail::const_range_tag() );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace iterator_range_detail
{
template< class Range >
@@ -813,6 +826,19 @@ public:
}
}
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
make_iterator_range( Range& r,
BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
{
return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
}
#else
template< class Range >
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
make_iterator_range( Range& r,
@@ -831,6 +857,8 @@ public:
return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
//! copy a range into a sequence
/*!
Construct a new sequence of the specified type from the elements

View File

@@ -17,7 +17,10 @@
#include <boost/range/iterator.hpp>
#include <boost/range/has_range_iterator.hpp>
#include <boost/range/result_iterator.hpp>
#include <boost/range/reverse_iterator.hpp>
#include <boost/range/const_reverse_iterator.hpp>
#include <boost/range/reverse_result_iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/size_type.hpp>
#include <boost/range/difference_type.hpp>

View File

@@ -90,7 +90,7 @@ class CTypedPtrMap;
#include <boost/iterator/transform_iterator.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/core/addressof.hpp>
#include <boost/utility/addressof.hpp>
#include <afx.h> // legacy CString
#include <afxcoll.h> // CXXXArray, CXXXList, CMapXXXToXXX
#include <tchar.h>
@@ -292,8 +292,11 @@ namespace boost { namespace range_detail_microsoft {
struct meta
{
typedef list_iterator<X, ::CObject *> mutable_iterator;
// const CObList and const CPtrList both return a value (and probably always will)
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
typedef list_iterator<X const, ::CObject const *> const_iterator;
#else
typedef list_iterator<X const, ::CObject const * const, ::CObject const * const> const_iterator;
#endif
};
};
@@ -306,8 +309,11 @@ namespace boost { namespace range_detail_microsoft {
struct meta
{
typedef list_iterator<X, void *> mutable_iterator;
// const CObList and const CPtrList both return a value (and probably always will)
#if !defined(BOOST_RANGE_MFC_CONST_COL_RETURNS_NON_REF)
typedef list_iterator<X const, void const *> const_iterator;
#else
typedef list_iterator<X const, void const * const, void const * const> const_iterator;
#endif
};
};

View File

@@ -21,6 +21,17 @@
namespace boost
{
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rbegin( C& c )
{
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::end( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rbegin( C& c )
@@ -39,6 +50,8 @@ rbegin( const C& c )
return iter_type( boost::end( c ) );
}
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class T >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
const_rbegin( const T& r )

View File

@@ -21,6 +21,17 @@
namespace boost
{
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rend( C& c )
{
return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::begin( c ) );
}
#else
template< class C >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
rend( C& c )
@@ -39,6 +50,8 @@ rend( const C& c )
return iter_type( boost::begin( c ) );
}
#endif
template< class T >
inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
const_rend( const T& r )

View File

@@ -15,10 +15,6 @@
# pragma once
#endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/range/iterator.hpp>")
#include <boost/range/iterator.hpp>
namespace boost

View File

@@ -15,10 +15,6 @@
# pragma once
#endif
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/range/reverse_iterator.hpp>")
#include <boost/range/reverse_iterator.hpp>
namespace boost

View File

@@ -62,7 +62,7 @@ namespace boost
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<SinglePassRange>));
#endif
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(__GNUC__, < 3) \
/**/
using namespace range_detail;

View File

@@ -20,7 +20,7 @@
#include <boost/range/concepts.hpp>
#include <boost/range/has_range_iterator.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/make_unsigned.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <cstddef>

View File

@@ -27,8 +27,6 @@
#include <boost/range/reference.hpp>
#include <boost/range/algorithm/equal.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/remove_reference.hpp>

View File

@@ -12,6 +12,5 @@
"maintainers": [
"Neil Groves <neilgroves -at- googlemail.com>",
"Nathan Ridge <zeratul976 -at- hotmail.com>"
],
"cxxstd": "03"
]
}

View File

@@ -1,22 +0,0 @@
# 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()

View File

@@ -14,217 +14,210 @@ import testing ;
project
: requirements
<library>/boost/assign//boost_assign
<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
<library>/boost/test//boost_unit_test_framework/
<library>/boost/regex//boost_regex/
<link>static
<threading>multi
<warnings>all
;
compile-fail compile_fail/iterator_range1.cpp ;
compile-fail compile_fail/adaptor/adjacent_filtered_concept.cpp ;
compile-fail compile_fail/adaptor/adjacent_filtered_concept2.cpp ;
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 ;
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 ;
rule range-test ( name : includes * )
{
return [
run $(name).cpp /boost/test//boost_unit_test_framework /boost/regex//boost_regex/<link>static
:
:
: <toolset>gcc:<cxxflags>"-Wall -Wunused "
] ;
}
run adaptor_test/adjacent_filtered.cpp ;
run adaptor_test/chained.cpp ;
run adaptor_test/copied.cpp ;
run adaptor_test/filtered.cpp ;
run adaptor_test/indexed.cpp ;
run adaptor_test/indirected.cpp ;
run adaptor_test/map.cpp ;
run adaptor_test/ref_unwrapped.cpp ;
run adaptor_test/ref_unwrapped_example.cpp ;
run adaptor_test/replaced.cpp ;
run adaptor_test/replaced_if.cpp ;
run adaptor_test/reversed.cpp ;
run adaptor_test/sliced.cpp ;
run adaptor_test/strided.cpp ;
run adaptor_test/strided2.cpp ;
test-suite range :
[ compile-fail compile_fail/iterator_range1.cpp ]
[ compile-fail compile_fail/adaptor/adjacent_filtered_concept.cpp ]
[ compile-fail compile_fail/adaptor/adjacent_filtered_concept2.cpp ]
[ 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 ]
[ 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 ]
[ range-test adaptor_test/adjacent_filtered ]
[ range-test adaptor_test/chained ]
[ range-test adaptor_test/copied ]
[ range-test adaptor_test/filtered ]
[ range-test adaptor_test/indexed ]
[ range-test adaptor_test/indirected ]
[ range-test adaptor_test/map ]
[ range-test adaptor_test/ref_unwrapped ]
[ range-test adaptor_test/ref_unwrapped_example ]
[ range-test adaptor_test/replaced ]
[ range-test adaptor_test/replaced_if ]
[ range-test adaptor_test/reversed ]
[ range-test adaptor_test/sliced ]
[ range-test adaptor_test/strided ]
[ range-test adaptor_test/strided2 ]
[ range-test adaptor_test/ticket_6742_transformed_c4789_warning ]
[ range-test adaptor_test/ticket_8676_sliced_transformed ]
[ range-test adaptor_test/ticket_9519_strided_reversed ]
[ range-test adaptor_test/tokenized ]
[ range-test adaptor_test/transformed ]
[ range-test adaptor_test/type_erased ]
[ range-test adaptor_test/type_erased_abstract ]
[ range-test adaptor_test/type_erased_brackets ]
[ range-test adaptor_test/type_erased_mix_values ]
[ range-test adaptor_test/type_erased_tparam_conv ]
[ range-test adaptor_test/type_erased_single_pass ]
[ range-test adaptor_test/type_erased_forward ]
[ range-test adaptor_test/type_erased_bidirectional ]
[ range-test adaptor_test/type_erased_random_access ]
[ range-test adaptor_test/uniqued ]
[ range-test adaptor_test/adjacent_filtered_example ]
[ range-test adaptor_test/copied_example ]
[ range-test adaptor_test/filtered_example ]
[ range-test adaptor_test/formatted ]
[ range-test adaptor_test/formatted_example ]
[ range-test adaptor_test/indexed_example ]
[ range-test adaptor_test/indirected_example ]
[ range-test adaptor_test/map_keys_example ]
[ range-test adaptor_test/map_values_example ]
[ range-test adaptor_test/replaced_example ]
[ range-test adaptor_test/replaced_if_example ]
[ range-test adaptor_test/reversed_example ]
[ range-test adaptor_test/sliced_example ]
[ range-test adaptor_test/strided_example ]
[ range-test adaptor_test/transformed_example ]
[ range-test adaptor_test/tokenized_example ]
[ range-test adaptor_test/type_erased_example ]
[ range-test adaptor_test/uniqued_example ]
[ range-test algorithm_test/adjacent_find ]
[ range-test algorithm_test/binary_search ]
[ range-test algorithm_test/copy ]
[ range-test algorithm_test/copy_backward ]
[ range-test algorithm_test/count ]
[ range-test algorithm_test/count_if ]
[ range-test algorithm_test/equal ]
[ range-test algorithm_test/equal_range ]
[ range-test algorithm_test/fill ]
[ range-test algorithm_test/find ]
[ range-test algorithm_test/find_if ]
[ range-test algorithm_test/find_end ]
[ range-test algorithm_test/find_first_of ]
[ range-test algorithm_test/for_each ]
[ range-test algorithm_test/generate ]
[ range-test algorithm_test/heap ]
[ range-test algorithm_test/includes ]
[ range-test algorithm_test/inplace_merge ]
[ range-test algorithm_test/lexicographical_compare ]
[ range-test algorithm_test/lower_bound ]
[ range-test algorithm_test/max_element ]
[ range-test algorithm_test/merge ]
[ range-test algorithm_test/min_element ]
[ range-test algorithm_test/mismatch ]
[ range-test algorithm_test/next_permutation ]
[ range-test algorithm_test/nth_element ]
[ range-test algorithm_test/partial_sort ]
[ range-test algorithm_test/partition ]
[ range-test algorithm_test/prev_permutation ]
[ range-test algorithm_test/random_shuffle ]
[ range-test algorithm_test/remove ]
[ range-test algorithm_test/remove_copy ]
[ range-test algorithm_test/remove_copy_if ]
[ range-test algorithm_test/remove_if ]
[ range-test algorithm_test/replace ]
[ range-test algorithm_test/replace_copy ]
[ range-test algorithm_test/replace_copy_if ]
[ range-test algorithm_test/replace_if ]
[ range-test algorithm_test/reverse ]
[ range-test algorithm_test/reverse_copy ]
[ range-test algorithm_test/rotate ]
[ range-test algorithm_test/rotate_copy ]
[ range-test algorithm_test/search ]
[ range-test algorithm_test/search_n ]
[ range-test algorithm_test/set_difference ]
[ range-test algorithm_test/set_intersection ]
[ range-test algorithm_test/set_symmetric_difference ]
[ range-test algorithm_test/set_union ]
[ range-test algorithm_test/sort ]
[ range-test algorithm_test/stable_partition ]
[ range-test algorithm_test/stable_sort ]
[ range-test algorithm_test/swap_ranges ]
[ range-test algorithm_test/transform ]
[ range-test algorithm_test/unique ]
[ range-test algorithm_test/unique_copy ]
[ range-test algorithm_test/upper_bound ]
[ range-test algorithm_ext_test/copy_n ]
[ range-test algorithm_ext_test/erase ]
[ range-test algorithm_ext_test/for_each_ext ]
[ range-test algorithm_ext_test/insert ]
[ range-test algorithm_ext_test/iota ]
[ range-test algorithm_ext_test/is_sorted ]
[ range-test algorithm_ext_test/overwrite ]
[ range-test algorithm_ext_test/push_back ]
[ range-test algorithm_ext_test/push_front ]
[ range-test adl_conformance ]
[ range-test adl_conformance_no_using ]
[ range-test algorithm ]
[ range-test algorithm_example ]
[ range-test array ]
# [ range-test atl : <include>$(VC71_ROOT)/atlmfc/include ]
[ range-test begin ]
[ range-test category ]
[ range-test combine ]
[ range-test compat2 ]
[ range-test compat3 ]
[ range-test const_iterator ]
[ range-test const_ranges ]
[ range-test const_reverse_iterator ]
[ range-test counting_range ]
[ range-test difference_type ]
[ range-test end ]
[ range-test extension_mechanism ]
[ range-test extension_size ]
[ range-test has_range_iterator ]
[ range-test irange ]
[ range-test istream_range ]
[ range-test iterator ]
[ range-test iterator_ext ]
[ range-test iterator_pair ]
[ range-test iterator_range ]
[ range-test iterator_range_drop ]
[ range-test iterator_range_equality_bug ]
[ range-test iterator_range_hash ]
[ range-test iterator_range_variant ]
# [ range-test mfc : <include>$(VC71_ROOT)/atlmfc/include ]
[ range-test join ]
[ range-test mutable_iterator ]
[ range-test partial_workaround ]
[ range-test pointer ]
[ range-test pointer_as_iterator ]
[ range-test reference ]
[ range-test result_iterator ]
[ range-test reverse_iterator ]
[ range-test reverse_result_iterator ]
[ range-test reversible_range ]
[ range-test size_type ]
[ 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 ]
;
run adaptor_test/ticket_6742_transformed_c4789_warning.cpp : : : <library>/boost/phoenix//boost_phoenix
# copy assignment operator of 'transform_iterator<boost::phoenix::actor<...' is deleted
<target-os>darwin:<build>no ;
run adaptor_test/ticket_8676_sliced_transformed.cpp ;
run adaptor_test/ticket_9519_strided_reversed.cpp ;
run adaptor_test/tokenized.cpp ;
run adaptor_test/transformed.cpp ;
run adaptor_test/type_erased.cpp ;
run adaptor_test/type_erased_abstract.cpp ;
run adaptor_test/type_erased_brackets.cpp ;
run adaptor_test/type_erased_mix_values.cpp ;
run adaptor_test/type_erased_tparam_conv.cpp ;
run adaptor_test/type_erased_single_pass.cpp ;
run adaptor_test/type_erased_forward.cpp ;
run adaptor_test/type_erased_bidirectional.cpp ;
run adaptor_test/type_erased_random_access.cpp ;
run adaptor_test/type_erased_transformed.cpp ;
run adaptor_test/uniqued.cpp ;
run adaptor_test/adjacent_filtered_example.cpp ;
run adaptor_test/copied_example.cpp ;
run adaptor_test/filtered_example.cpp ;
run adaptor_test/formatted.cpp ;
run adaptor_test/formatted_example.cpp ;
run adaptor_test/indexed_example.cpp ;
run adaptor_test/indirected_example.cpp ;
run adaptor_test/map_keys_example.cpp ;
run adaptor_test/map_values_example.cpp ;
run adaptor_test/replaced_example.cpp ;
run adaptor_test/replaced_if_example.cpp ;
run adaptor_test/reversed_example.cpp ;
run adaptor_test/sliced_example.cpp ;
run adaptor_test/strided_example.cpp ;
run adaptor_test/transformed_example.cpp ;
run adaptor_test/tokenized_example.cpp ;
run adaptor_test/type_erased_example.cpp ;
run adaptor_test/uniqued_example.cpp ;
run algorithm_test/adjacent_find.cpp ;
run algorithm_test/binary_search.cpp ;
run algorithm_test/copy.cpp ;
run algorithm_test/copy_backward.cpp ;
run algorithm_test/count.cpp ;
run algorithm_test/count_if.cpp ;
run algorithm_test/equal.cpp ;
run algorithm_test/equal_range.cpp ;
run algorithm_test/fill.cpp ;
run algorithm_test/find.cpp ;
run algorithm_test/find_if.cpp ;
# these two tests require /bigobj in windows-cmake-test
run algorithm_test/find_end.cpp : ;
run algorithm_test/find_first_of.cpp : ;
run algorithm_test/for_each.cpp ;
run algorithm_test/generate.cpp ;
run algorithm_test/heap.cpp ;
run algorithm_test/includes.cpp ;
run algorithm_test/inplace_merge.cpp ;
run algorithm_test/lexicographical_compare.cpp ;
run algorithm_test/lower_bound.cpp ;
run algorithm_test/max_element.cpp ;
run algorithm_test/merge.cpp ;
run algorithm_test/min_element.cpp ;
run algorithm_test/mismatch.cpp ;
run algorithm_test/next_permutation.cpp ;
run algorithm_test/nth_element.cpp ;
run algorithm_test/partial_sort.cpp ;
run algorithm_test/partition.cpp ;
run algorithm_test/prev_permutation.cpp ;
run algorithm_test/random_shuffle.cpp ;
run algorithm_test/remove.cpp ;
run algorithm_test/remove_copy.cpp ;
run algorithm_test/remove_copy_if.cpp ;
run algorithm_test/remove_if.cpp ;
run algorithm_test/replace.cpp ;
run algorithm_test/replace_copy.cpp ;
run algorithm_test/replace_copy_if.cpp ;
run algorithm_test/replace_if.cpp ;
run algorithm_test/reverse.cpp ;
run algorithm_test/reverse_copy.cpp ;
run algorithm_test/rotate.cpp ;
run algorithm_test/rotate_copy.cpp ;
run algorithm_test/search.cpp ;
run algorithm_test/search_n.cpp ;
run algorithm_test/set_difference.cpp ;
run algorithm_test/set_intersection.cpp ;
run algorithm_test/set_symmetric_difference.cpp ;
run algorithm_test/set_union.cpp ;
run algorithm_test/sort.cpp ;
run algorithm_test/stable_partition.cpp ;
run algorithm_test/stable_sort.cpp ;
run algorithm_test/swap_ranges.cpp ;
run algorithm_test/transform.cpp ;
run algorithm_test/unique.cpp ;
run algorithm_test/unique_copy.cpp ;
run algorithm_test/upper_bound.cpp ;
run algorithm_ext_test/copy_n.cpp ;
run algorithm_ext_test/erase.cpp ;
run algorithm_ext_test/for_each_ext.cpp ;
run algorithm_ext_test/insert.cpp ;
run algorithm_ext_test/iota.cpp ;
run algorithm_ext_test/is_sorted.cpp ;
run algorithm_ext_test/overwrite.cpp ;
run algorithm_ext_test/push_back.cpp ;
run algorithm_ext_test/push_front.cpp ;
run adl_conformance.cpp ;
run adl_conformance_no_using.cpp ;
run algorithm.cpp ;
run algorithm_example.cpp ;
run array.cpp ;
#run atl.cpp : <include>$(VC71_ROOT)/atlmfc/include ;
run begin.cpp ;
run category.cpp ;
run combine.cpp ;
run compat2.cpp ;
run compat3.cpp ;
run const_iterator.cpp ;
run const_ranges.cpp ;
run const_reverse_iterator.cpp ;
run counting_range.cpp ;
run difference_type.cpp ;
run end.cpp ;
run extension_mechanism.cpp ;
run extension_size.cpp ;
run has_range_iterator.cpp ;
run irange.cpp ;
run istream_range.cpp ;
run iterator.cpp ;
run iterator_ext.cpp ;
run iterator_pair.cpp ;
run iterator_range.cpp ;
run iterator_range_drop.cpp ;
run iterator_range_equality_bug.cpp ;
run iterator_range_hash.cpp ;
run iterator_range_variant.cpp ;
#run mfc.cpp : <include>$(VC71_ROOT)/atlmfc/include ;
run join.cpp ;
run mutable_iterator.cpp ;
run partial_workaround.cpp ;
run pointer.cpp ;
run pointer_as_iterator.cpp ;
run reference.cpp ;
run result_iterator.cpp ;
run reverse_iterator.cpp ;
run reverse_result_iterator.cpp ;
run reversible_range.cpp ;
run size_type.cpp ;
run std_container.cpp ;
run string.cpp ;
run sub_range.cpp ;
run ticket_5486.cpp ;
run ticket_5544_terminate_irange.cpp ;
run ticket_5547.cpp ;
run ticket_5556_is_sorted_namespace.cpp ;
run ticket_5811_indirected_optional.cpp ;
run ticket_6715_iterator_range_equality.cpp ;
run ticket_6944.cpp ;
run ticket_10336.cpp ;
run value_type.cpp ;
# `quick` target (for CI)
alias quick : std_container ;

View File

@@ -19,7 +19,7 @@
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/adaptor/filtered.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/test/unit_test.hpp>
@@ -88,8 +88,6 @@ void chained_adaptors_test()
std::set<foo> foos;
using namespace boost::placeholders;
boost::copy(sep
| boost::adaptors::transformed(boost::bind(&foo::from_string, _1))
| boost::adaptors::filtered(boost::bind(&foo::is_valid, _1)),

View File

@@ -17,7 +17,7 @@
#include <vector>
#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_CXX11_RANGE_BASED_FOR) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_CXX11_RANGE_BASED_FOR)
namespace boost
{

View File

@@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind.hpp>
#include <boost/range/algorithm_ext.hpp>
#include <algorithm>
@@ -140,7 +140,6 @@ namespace boost
void transformed_bind()
{
using namespace boost::adaptors;
using namespace boost::placeholders;
std::vector<foo_bind> input(5);
std::vector<int> output;

View File

@@ -1,67 +0,0 @@
// Boost.Range library
//
// Copyright Neil Groves 2014. Use, modification and
// distribution is subject to 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 <boost/range/adaptor/type_erased.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/numeric.hpp>
#include "type_erased_test.hpp"
#include <boost/test/unit_test.hpp>
#include <vector>
namespace boost_range_adaptor_type_erased_test
{
namespace
{
typedef boost::any_range<
int,
boost::random_access_traversal_tag,
int,
std::ptrdiff_t
> any_integer_value_range;
struct get_fn
{
typedef boost::int32_t result_type;
boost::int32_t operator()(const MockType& val) const
{
return val.get();
}
};
int accumulate_any_integer_value_range(any_integer_value_range rng)
{
return boost::accumulate(rng, 0);
}
void test_type_erased_transformed()
{
std::vector<MockType> v(5, MockType(3));
const int sum = accumulate_any_integer_value_range(
v | boost::adaptors::transformed(get_fn()));
BOOST_CHECK_EQUAL(15, sum);
}
} // anonymous namespace
} // namespace boost_range_adaptor_type_erased_test
boost::unit_test::test_suite*
init_unit_test_suite(int, char*[])
{
boost::unit_test::test_suite* test
= BOOST_TEST_SUITE("RangeTestSuite.adaptor.type_erased_transformed");
test->add(
BOOST_TEST_CASE(
&boost_range_adaptor_type_erased_test::test_type_erased_transformed));
return test;
}

View File

@@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@@ -23,20 +23,21 @@
#define _SCL_SECURE_NO_WARNINGS
#endif
#if defined(_MSC_VER) && !defined(__clang__)
#ifdef _MSC_VER
// counting_iterator generates a warning about truncating an integer
#pragma warning(push)
#pragma warning(disable : 4244)
#endif
#include <boost/iterator/counting_iterator.hpp>
#if defined(_MSC_VER) && !defined(__clang__)
#ifdef _MSC_VER
template ::boost::counting_iterator<int>;
#pragma warning(pop)
#endif
#include <boost/assign.hpp>
#include <boost/config.hpp>
#include <boost/config.hpp>
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/range/numeric.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/value_type.hpp>

View File

@@ -10,7 +10,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# pragma warn -8091 // suppress warning in Boost.Test
# pragma warn -8057 // unused argument argc/argv in Boost.Test
#endif

View File

@@ -112,64 +112,6 @@ namespace
test_remove_erase_if_impl<std::list<int> >();
}
template< class Container >
void test_unique_erase_impl()
{
Container source;
source.push_back(1);
source.push_back(1);
source.push_back(1);
source.push_back(2);
source.push_back(3);
source.push_back(3);
Container reference;
reference.push_back(1);
reference.push_back(2);
reference.push_back(3);
boost::unique_erase(source);
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
source.begin(), source.end() );
}
void test_unique_erase()
{
test_unique_erase_impl<std::vector<int> >();
test_unique_erase_impl<std::list<int> >();
}
struct distance_smaller_2
{
typedef bool result_type;
typedef int argument_type;
bool operator()(int x, int y) const { return std::abs(x - y) < 2; }
};
template< class Container >
void test_unique_erase_pred_impl()
{
Container source;
for (int i = 0; i < 10; ++i)
source.push_back(i);
Container reference;
for (int i = 0; i < 10; i += 2)
reference.push_back(i);
boost::unique_erase(source, distance_smaller_2());
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
source.begin(), source.end() );
}
void test_unique_erase_pred()
{
test_unique_erase_pred_impl<std::vector<int> >();
test_unique_erase_pred_impl<std::list<int> >();
}
}
boost::unit_test::test_suite*
@@ -181,8 +123,6 @@ init_unit_test_suite(int argc, char* argv[])
test->add( BOOST_TEST_CASE( &test_erase ) );
test->add( BOOST_TEST_CASE( &test_remove_erase ) );
test->add( BOOST_TEST_CASE( &test_remove_erase_if ) );
test->add( BOOST_TEST_CASE( &test_unique_erase ) );
test->add( BOOST_TEST_CASE( &test_unique_erase_pred ) );
return test;
}

View File

@@ -19,6 +19,7 @@
#include <list>
#include <vector>
namespace
{
template< class Container >
@@ -58,6 +59,76 @@ namespace
test_push_back_impl< std::vector<std::size_t> >();
test_push_back_impl< std::list<std::size_t> >();
}
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
// test type which is not copyable by moveable.
class noncopyable_int : boost::noncopyable {
private:
int i;
public:
noncopyable_int(int x) : i(x) {}
noncopyable_int(const noncopyable_int&) = delete;
noncopyable_int& operator=(const noncopyable_int&) = delete;
noncopyable_int(noncopyable_int&& o) : i(o.i) {}
noncopyable_int& operator=(noncopyable_int&& o) { return o; }
bool operator!=(const noncopyable_int &rhs) { return i != rhs.i; }
friend std::ostream &operator<<(std::ostream &os, const noncopyable_int& x);
};
std::ostream & operator<<(std::ostream &os, const noncopyable_int& x)
{
return os << x.i;
}
template< class Container >
void test_push_back_move_impl(std::size_t n)
{
Container test;
Container reference;
for (std::size_t i = 0; i < n; ++i)
reference.push_back(noncopyable_int(i));
{
Container to_push_back;
for (std::size_t i = 0; i < n; ++i)
to_push_back.push_back(noncopyable_int(i));
boost::push_back(test, std::move(to_push_back));
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
test.begin(), test.end() );
}
// Do it again to push onto non-empty container
for (std::size_t i = 0; i < n; ++i)
reference.push_back(noncopyable_int(i));
{
Container to_push_back;
for (std::size_t i = 0; i < n; ++i)
to_push_back.push_back(noncopyable_int(i));
boost::push_back(test, std::move(to_push_back));
BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(),
test.begin(), test.end() );
}
}
template< class Container >
void test_push_back_move_impl()
{
test_push_back_move_impl< Container >(0);
test_push_back_move_impl< Container >(1);
test_push_back_move_impl< Container >(2);
test_push_back_move_impl< Container >(100);
}
void test_push_back_move()
{
test_push_back_move_impl< std::vector<noncopyable_int> >();
test_push_back_move_impl< std::list<noncopyable_int> >();
}
#endif
}
boost::unit_test::test_suite*
@@ -67,6 +138,9 @@ init_unit_test_suite(int argc, char* argv[])
= BOOST_TEST_SUITE( "RangeTestSuite.algorithm_ext.push_back" );
test->add( BOOST_TEST_CASE( &test_push_back ) );
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
test->add( BOOST_TEST_CASE( &test_push_back_move ) );
#endif
return test;
}

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -14,6 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -11,6 +11,7 @@
#include <boost/test/test_tools.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/range/algorithm/lower_bound.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/range/iterator.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <boost/range/iterator.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -14,6 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include "../test_driver/range_return_test_driver.hpp"
#include <algorithm>
#include <functional>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include "../test_function/counted_function.hpp"
#include <algorithm>
#include <functional>

View File

@@ -14,6 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -14,6 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@@ -64,8 +64,6 @@ namespace
template< class Container >
void test_remove_copy_if_( const Container& c, int to_remove )
{
using namespace boost::placeholders;
test_remove_copy_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_remove));
test_remove_copy_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_remove));
}

View File

@@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@@ -59,8 +59,6 @@ namespace boost
template< class Container >
void test_remove_if_( const Container& c, int to_remove )
{
using namespace boost::placeholders;
test_remove_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_remove));
test_remove_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_remove));
}

View File

@@ -14,6 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@@ -66,8 +66,6 @@ namespace
template< class Container >
void test_replace_copy_if_( const Container& c, int to_replace )
{
using namespace boost::placeholders;
test_replace_copy_if_impl(c, boost::bind(std::equal_to<int>(), _1, to_replace));
test_replace_copy_if_impl(c, boost::bind(std::not_equal_to<int>(), _1, to_replace));
}

View File

@@ -14,7 +14,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind/bind.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>
@@ -29,8 +29,6 @@ namespace boost
template< class Container, class UnaryPredicate >
void test_replace_if_impl(Container& cont, UnaryPredicate pred)
{
using namespace boost::placeholders;
const int what = 2;
const int with_what = 5;

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

View File

@@ -12,6 +12,7 @@
#include <boost/test/unit_test.hpp>
#include <boost/assign.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <functional>
#include <list>

Some files were not shown because too many files have changed in this diff Show More