mirror of
https://github.com/boostorg/parameter.git
synced 2026-01-20 16:52:13 +00:00
Compare commits
31 Commits
boost-1.72
...
boost-1.78
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b06ee2bf8a | ||
|
|
d52fef9cb1 | ||
|
|
56bd845cff | ||
|
|
d95a1617a1 | ||
|
|
7192dd51a9 | ||
|
|
40f362bea3 | ||
|
|
badc449092 | ||
|
|
a1986ac445 | ||
|
|
94bfc0544a | ||
|
|
91b5d79782 | ||
|
|
aeb122089c | ||
|
|
27d0bfaf8c | ||
|
|
e38b1160ae | ||
|
|
6f4cdc939d | ||
|
|
63104db02c | ||
|
|
8f1405b880 | ||
|
|
c397e90107 | ||
|
|
b3ed2d1bcf | ||
|
|
3eada7d595 | ||
|
|
9f0b903f88 | ||
|
|
187377089a | ||
|
|
983bf6bebc | ||
|
|
e16f1025d7 | ||
|
|
7d168437b7 | ||
|
|
d59eb4aadd | ||
|
|
9fc61ba8ff | ||
|
|
fb1a25471c | ||
|
|
59306fe2ed | ||
|
|
201a7e20d0 | ||
|
|
c31433af1f | ||
|
|
0f548424a5 |
431
.github/workflows/ci.yml
vendored
Normal file
431
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,431 @@
|
||||
# Copyright 2021 Andrey Semashev
|
||||
#
|
||||
# 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)
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- feature/**
|
||||
|
||||
concurrency:
|
||||
group: ${{format('{0}:{1}', github.repository, github.ref)}}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GIT_FETCH_JOBS: 8
|
||||
NET_RETRY_COUNT: 5
|
||||
DEFAULT_BUILD_VARIANT: debug,release
|
||||
|
||||
jobs:
|
||||
posix:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux, gcc
|
||||
- toolset: gcc-4.4
|
||||
cxxstd: "98,0x"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.4
|
||||
sources:
|
||||
- "ppa:ubuntu-toolchain-r/test"
|
||||
- toolset: gcc-4.6
|
||||
cxxstd: "03,0x"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- "ppa:ubuntu-toolchain-r/test"
|
||||
- toolset: gcc-4.7
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.7
|
||||
- toolset: gcc-4.8
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- g++-4.8
|
||||
- toolset: gcc-4.9
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.9
|
||||
- toolset: gcc-5
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-5
|
||||
- toolset: gcc-6
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- g++-6
|
||||
- toolset: gcc-7
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- g++-7
|
||||
- toolset: gcc-8
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- g++-8
|
||||
- toolset: gcc-9
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- g++-9
|
||||
- toolset: gcc-10
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- g++-10
|
||||
- toolset: gcc-11
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- g++-11
|
||||
sources:
|
||||
- "ppa:ubuntu-toolchain-r/test"
|
||||
- name: UBSAN
|
||||
toolset: gcc-11
|
||||
cxxstd: "03,11,14,17,20"
|
||||
ubsan: 1
|
||||
build_variant: debug
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- g++-11
|
||||
sources:
|
||||
- "ppa:ubuntu-toolchain-r/test"
|
||||
|
||||
# Linux, clang
|
||||
- toolset: clang
|
||||
compiler: clang++-3.5
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.5
|
||||
- toolset: clang
|
||||
compiler: clang++-3.6
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.6
|
||||
- toolset: clang
|
||||
compiler: clang++-3.7
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.7
|
||||
- toolset: clang
|
||||
compiler: clang++-3.8
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-20.04
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.8
|
||||
- toolset: clang
|
||||
compiler: clang++-3.9
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- clang-3.9
|
||||
- toolset: clang
|
||||
compiler: clang++-4.0
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- clang-4.0
|
||||
- toolset: clang
|
||||
compiler: clang++-5.0
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- clang-5.0
|
||||
- toolset: clang
|
||||
compiler: clang++-6.0
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- clang-6.0
|
||||
- toolset: clang
|
||||
compiler: clang++-7
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- clang-7
|
||||
# Note: clang-8 does not fully support C++20, so it is not compatible with libstdc++-8 in this mode
|
||||
- toolset: clang
|
||||
compiler: clang++-8
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-18.04
|
||||
install:
|
||||
- clang-8
|
||||
- g++-7
|
||||
gcc_toolchain: 7
|
||||
- toolset: clang
|
||||
compiler: clang++-9
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- clang-9
|
||||
- toolset: clang
|
||||
compiler: clang++-10
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- clang-10
|
||||
- toolset: clang
|
||||
compiler: clang++-11
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- clang-11
|
||||
- toolset: clang
|
||||
compiler: clang++-12
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- clang-12
|
||||
- toolset: clang
|
||||
compiler: clang++-12
|
||||
cxxstd: "03,11,14,17,20"
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- clang-12
|
||||
- libc++-12-dev
|
||||
- libc++abi-12-dev
|
||||
cxxflags: -stdlib=libc++
|
||||
linkflags: -stdlib=libc++
|
||||
- name: UBSAN
|
||||
toolset: clang
|
||||
compiler: clang++-12
|
||||
cxxstd: "03,11,14,17,20"
|
||||
cxxflags: -stdlib=libc++
|
||||
linkflags: -stdlib=libc++
|
||||
ubsan: 1
|
||||
build_variant: debug
|
||||
os: ubuntu-20.04
|
||||
install:
|
||||
- clang-12
|
||||
- libc++-12-dev
|
||||
- libc++abi-12-dev
|
||||
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: macos-10.15
|
||||
|
||||
timeout-minutes: 60
|
||||
runs-on: ${{matrix.os}}
|
||||
container: ${{matrix.container}}
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
run: |
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
fi
|
||||
if [ -n "${{matrix.container}}" ]
|
||||
then
|
||||
echo "GHA_CONTAINER=${{matrix.container}}" >> $GITHUB_ENV
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
|
||||
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common tzdata wget curl apt-transport-https ca-certificates make build-essential g++ python python3 libpython-dev libpython3-dev perl git cmake
|
||||
fi
|
||||
fi
|
||||
git config --global pack.threads 0
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
run: |
|
||||
declare -a SOURCE_KEYS SOURCES
|
||||
if [ -n "${{join(matrix.source_keys, ' ')}}" ]
|
||||
then
|
||||
SOURCE_KEYS=("${{join(matrix.source_keys, '" "')}}")
|
||||
fi
|
||||
if [ -n "${{join(matrix.sources, ' ')}}" ]
|
||||
then
|
||||
SOURCES=("${{join(matrix.sources, '" "')}}")
|
||||
fi
|
||||
for key in "${SOURCE_KEYS[@]}"
|
||||
do
|
||||
for i in {1..$NET_RETRY_COUNT}
|
||||
do
|
||||
echo "Adding key: $key"
|
||||
wget -O - "$key" | sudo apt-key add - && break || sleep 2
|
||||
done
|
||||
done
|
||||
if [ ${#SOURCES[@]} -gt 0 ]
|
||||
then
|
||||
APT_ADD_REPO_COMMON_ARGS=("-y")
|
||||
APT_ADD_REPO_SUPPORTED_ARGS="$(apt-add-repository --help | perl -ne 'if (/^\s*-n/) { print "n"; } elsif (/^\s*-P/) { print "P"; } elsif (/^\s*-S/) { print "S"; } elsif (/^\s*-U/) { print "U"; }')"
|
||||
if [ -n "$APT_ADD_REPO_SUPPORTED_ARGS" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*n*}" ]
|
||||
then
|
||||
APT_ADD_REPO_COMMON_ARGS+=("-n")
|
||||
fi
|
||||
APT_ADD_REPO_HAS_SOURCE_ARGS="$([ -n "$APT_ADD_REPO_SUPPORTED_ARGS" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*P*}" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*S*}" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*U*}" ] && echo 1 || echo 0)"
|
||||
for source in "${SOURCES[@]}"
|
||||
do
|
||||
for i in {1..$NET_RETRY_COUNT}
|
||||
do
|
||||
APT_ADD_REPO_ARGS=("${APT_ADD_REPO_COMMON_ARGS[@]}")
|
||||
if [ $APT_ADD_REPO_HAS_SOURCE_ARGS -ne 0 ]
|
||||
then
|
||||
case "$source" in
|
||||
"ppa:"*)
|
||||
APT_ADD_REPO_ARGS+=("-P")
|
||||
;;
|
||||
"deb "*)
|
||||
APT_ADD_REPO_ARGS+=("-S")
|
||||
;;
|
||||
*)
|
||||
APT_ADD_REPO_ARGS+=("-U")
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
APT_ADD_REPO_ARGS+=("$source")
|
||||
echo "apt-add-repository ${APT_ADD_REPO_ARGS[@]}"
|
||||
sudo -E apt-add-repository "${APT_ADD_REPO_ARGS[@]}" && break || sleep 2
|
||||
done
|
||||
done
|
||||
fi
|
||||
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
|
||||
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{join(matrix.install, ' ')}}
|
||||
|
||||
- name: Setup GCC Toolchain
|
||||
if: matrix.gcc_toolchain
|
||||
run: |
|
||||
GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain"
|
||||
echo "GCC_TOOLCHAIN_ROOT=\"$GCC_TOOLCHAIN_ROOT\"" >> $GITHUB_ENV
|
||||
MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
||||
mkdir -p "$GCC_TOOLCHAIN_ROOT"
|
||||
ln -s /usr/include "$GCC_TOOLCHAIN_ROOT/include"
|
||||
ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin"
|
||||
mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET"
|
||||
ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}"
|
||||
|
||||
- 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
|
||||
BUILD_JOBS=$((nproc || sysctl -n hw.ncpu) 2> /dev/null)
|
||||
echo "BUILD_JOBS=$BUILD_JOBS" >> $GITHUB_ENV
|
||||
echo "CMAKE_BUILD_PARALLEL_LEVEL=$BUILD_JOBS" >> $GITHUB_ENV
|
||||
DEPINST_ARGS=()
|
||||
GIT_VERSION="$(git --version | sed -e 's/git version //')"
|
||||
GIT_HAS_JOBS=1
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
if $(dpkg --compare-versions "$GIT_VERSION" lt 2.8.0)
|
||||
then
|
||||
GIT_HAS_JOBS=0
|
||||
fi
|
||||
else
|
||||
declare -a GIT_VER=(${GIT_VERSION//./ })
|
||||
declare -a GIT_MIN_VER=(2 8 0)
|
||||
for ((i=0; i<${#GIT_VER[@]}; i++))
|
||||
do
|
||||
if [ -z "${GIT_MIN_VER[i]}" ]
|
||||
then
|
||||
GIT_MIN_VER[i]=0
|
||||
fi
|
||||
if [ "${GIT_VER[i]}" -lt "${GIT_MIN_VER[i]}" ]
|
||||
then
|
||||
GIT_HAS_JOBS=0
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$GIT_HAS_JOBS" -ne 0 ]
|
||||
then
|
||||
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
|
||||
fi
|
||||
cd ..
|
||||
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
|
||||
cd boost-root
|
||||
mkdir -p libs/$LIBRARY
|
||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||
git submodule update --init tools/boostdep
|
||||
DEPINST_ARGS+=("$LIBRARY")
|
||||
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
|
||||
if [ -z "${{matrix.cmake_tests}}" ]
|
||||
then
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
|
||||
then
|
||||
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
|
||||
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
|
||||
then
|
||||
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
|
||||
fi
|
||||
echo " ;" >> ~/user-config.jam
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Run tests
|
||||
if: matrix.cmake_tests == ''
|
||||
run: |
|
||||
cd ../boost-root
|
||||
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
|
||||
if [ -n "${{matrix.build_variant}}" ]
|
||||
then
|
||||
B2_ARGS+=("variant=${{matrix.build_variant}}")
|
||||
else
|
||||
B2_ARGS+=("variant=$DEFAULT_BUILD_VARIANT")
|
||||
fi
|
||||
if [ -n "${{matrix.threading}}" ]
|
||||
then
|
||||
B2_ARGS+=("threading=${{matrix.threading}}")
|
||||
fi
|
||||
if [ -n "${{matrix.ubsan}}" ]
|
||||
then
|
||||
export UBSAN_OPTIONS="print_stacktrace=1"
|
||||
# python tests fail under UBSAN
|
||||
export BOOST_PARAMETER_TEST_WITHOUT_PYTHON_TESTS=1
|
||||
B2_ARGS+=("cxxflags=-fsanitize=undefined -fno-sanitize-recover=undefined" "linkflags=-fsanitize=undefined -fuse-ld=gold" "define=UBSAN=1" "debug-symbols=on" "visibility=global")
|
||||
fi
|
||||
if [ -n "${{matrix.cxxflags}}" ]
|
||||
then
|
||||
B2_ARGS+=("cxxflags=${{matrix.cxxflags}}")
|
||||
fi
|
||||
if [ -n "${{matrix.linkflags}}" ]
|
||||
then
|
||||
B2_ARGS+=("linkflags=${{matrix.linkflags}}")
|
||||
fi
|
||||
B2_ARGS+=("libs/$LIBRARY/test")
|
||||
./b2 "${B2_ARGS[@]}"
|
||||
286
.travis.yml
286
.travis.yml
@@ -1,286 +0,0 @@
|
||||
# Copyright 2016 Edward Diener
|
||||
# Copyright 2017 Cromwell D. Enage
|
||||
# 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)
|
||||
|
||||
dist: xenial
|
||||
language: cpp
|
||||
|
||||
python: "2.7"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- BOGUS_JOB=true
|
||||
|
||||
matrix:
|
||||
|
||||
exclude:
|
||||
- env: BOGUS_JOB=true
|
||||
|
||||
include:
|
||||
- os: linux
|
||||
compiler: g++-4.4
|
||||
env: TOOLSET=gcc COMPILER=g++-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 COMPILER=g++-4.6 CXXSTD=03,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z CXXSTD_DIALECT=cxxstd-dialect=gnu
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 CXXSTD_DIALECT=cxxstd-dialect=gnu
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-8
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.5
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.6
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.7
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.8
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-4.0
|
||||
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-4.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-4.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-5.0
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-5.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-6.0
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,1z,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-6.0
|
||||
- libc6-dbg
|
||||
- libc++-dev
|
||||
- libstdc++-8-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-6.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-7
|
||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=14,1z,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-7
|
||||
- libc6-dbg
|
||||
- libc++-dev
|
||||
- libstdc++-8-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-7
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-8
|
||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=14,1z,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-8
|
||||
- libc6-dbg
|
||||
- libc++-dev
|
||||
- libstdc++-8-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-8
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
osx_image: xcode7.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
osx_image: xcode8.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
osx_image: xcode9.4.1
|
||||
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- cd ..
|
||||
- git clone -b $TRAVIS_BRANCH --depth 1 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
|
||||
- git submodule update --init libs/parameter_python
|
||||
- git submodule update --init tools/boost_install
|
||||
- git submodule update --init libs/headers
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/parameter
|
||||
- python tools/boostdep/depinst/depinst.py parameter
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
- ./b2 --verbose-test libs/config/test//config_info toolset=$TOOLSET cxxstd=$CXXSTD || true
|
||||
- cd libs/parameter/test
|
||||
- ../../../b2 -j`(nproc || sysctl -n hw.ncpu) 2> /dev/null` toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
|
||||
- cd ../../..
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
||||
@@ -1,36 +1,34 @@
|
||||
# Copyright 2019 Mike Dev
|
||||
# Generated by `boostdep --cmake parameter`
|
||||
# Copyright 2020 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
|
||||
#
|
||||
# NOTE: CMake support for Boost.Parameter is currently experimental at best
|
||||
# and the interface is likely to change in the future
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
project( BoostParameter LANGUAGES CXX)
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
option(BOOST_PARAMETER_INCLUDE_TESTS OFF "Include Boost.Parameter tests")
|
||||
project(boost_parameter VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library( boost_parameter INTERFACE )
|
||||
add_library( Boost::parameter ALIAS boost_parameter )
|
||||
add_library(boost_parameter INTERFACE)
|
||||
add_library(Boost::parameter ALIAS boost_parameter)
|
||||
|
||||
target_include_directories( boost_parameter INTERFACE include )
|
||||
target_include_directories(boost_parameter INTERFACE include)
|
||||
|
||||
target_link_libraries( boost_parameter
|
||||
INTERFACE
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::function
|
||||
Boost::fusion
|
||||
# TODO: we only need mp11 or mpl
|
||||
Boost::mp11
|
||||
Boost::mpl
|
||||
Boost::optional
|
||||
Boost::preprocessor
|
||||
Boost::type_traits
|
||||
Boost::utility
|
||||
target_link_libraries(boost_parameter
|
||||
INTERFACE
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::function
|
||||
Boost::fusion
|
||||
Boost::mp11
|
||||
Boost::mpl
|
||||
Boost::optional
|
||||
Boost::preprocessor
|
||||
Boost::type_traits
|
||||
Boost::utility
|
||||
)
|
||||
|
||||
if(BOOST_PARAMETER_INCLUDE_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
26
README.md
Normal file
26
README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Boost.Parameter
|
||||
|
||||
Boost.Parameter, part of collection of the [Boost C++ Libraries](https://github.com/boostorg), is a header-only library that implements named parameters for functions and templates in C++.
|
||||
|
||||
### Directories
|
||||
|
||||
* **doc** - Documentation sources
|
||||
* **include** - Interface headers of Boost.Parameter
|
||||
* **test** - Boost.Parameter unit tests
|
||||
|
||||
### More information
|
||||
|
||||
* [Documentation](https://www.boost.org/libs/parameter)
|
||||
* [Report bugs](https://github.com/boostorg/parameter/issues/new). Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
|
||||
* Submit your patches as [pull requests](https://github.com/boostorg/parameter/compare) against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
### Build status
|
||||
|
||||
Branch | GitHub Actions | AppVeyor | Test Matrix | Dependencies |
|
||||
:-------------: | -------------- | -------- | ----------- | ------------ |
|
||||
[`master`](https://github.com/boostorg/parameter/tree/master) | [](https://github.com/boostorg/parameter/actions?query=branch%3Amaster) | [](https://ci.appveyor.com/project/Lastique/parameter/branch/master) | [](http://www.boost.org/development/tests/master/developer/parameter.html) | [](https://pdimov.github.io/boostdep-report/master/parameter.html)
|
||||
[`develop`](https://github.com/boostorg/parameter/tree/develop) | [](https://github.com/boostorg/parameter/actions?query=branch%3Adevelop) | [](https://ci.appveyor.com/project/Lastique/parameter/branch/develop) | [](http://www.boost.org/development/tests/develop/developer/parameter.html) | [](https://pdimov.github.io/boostdep-report/develop/parameter.html)
|
||||
|
||||
### License
|
||||
|
||||
Distributed under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
|
||||
84
appveyor.yml
84
appveyor.yml
@@ -1,5 +1,6 @@
|
||||
# Copyright 2017 Edward Diener
|
||||
# Copyright 2017 Cromwell D. Enage
|
||||
# Copyright 2021 Andrey Semashev
|
||||
# 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)
|
||||
@@ -12,58 +13,61 @@ branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- ARGS: --toolset=gcc address-model=32
|
||||
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
|
||||
- ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition
|
||||
- ARGS: toolset=msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0 address-model=32
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=msvc-14.0 address-model=32,64 cxxstd=14,latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=msvc-14.1 address-model=32,64 cxxstd=14,17,latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- ARGS: toolset=msvc-14.2 address-model=32,64 cxxstd=14,17,latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- ARGS: toolset=gcc address-model=32 cxxstd=03,11,14,1z
|
||||
PATH: C:\cygwin\bin;%PATH%
|
||||
# Cygwin does not have python headers installed, the compiler picks up Win32 headers in C:\Python27\Include and fails
|
||||
BOOST_PARAMETER_TEST_WITHOUT_PYTHON_TESTS: 1
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=gcc address-model=64 cxxstd=03,11,14,1z
|
||||
PATH: C:\cygwin64\bin;%PATH%
|
||||
# Cygwin64 does not have python headers installed, the compiler picks up Win32 headers in C:\Python27\Include and fails
|
||||
BOOST_PARAMETER_TEST_WITHOUT_PYTHON_TESTS: 1
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=gcc address-model=32 cxxstd=03,11 linkflags=-Wl,-allow-multiple-definition
|
||||
PATH: C:\MinGW\bin;%PATH%
|
||||
- ARGS: --toolset=gcc address-model=64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=gcc address-model=32 cxxstd=03,11,14
|
||||
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=gcc address-model=64 cxxstd=03,11,14,1z
|
||||
PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
|
||||
- ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z
|
||||
PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-9.0 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-10.0 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-11.0 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-12.0 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-12.0 address-model=64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-14.0 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-14.0 address-model=64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARGS: --toolset=msvc-14.1 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARGS: --toolset=msvc-14.1 address-model=64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- ARGS: toolset=gcc address-model=64 cxxstd=03,11,14,1z
|
||||
PATH: C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH%
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
|
||||
install:
|
||||
- set GIT_FETCH_JOBS=8
|
||||
- set BOOST_BRANCH=develop
|
||||
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
|
||||
- cd ..
|
||||
- git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root
|
||||
- git clone -b %BOOST_BRANCH% --depth 1 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
|
||||
- git submodule update --init libs/parameter_python
|
||||
- git submodule update --init tools/boost_install
|
||||
- git submodule update --init libs/headers
|
||||
- git submodule init tools/build
|
||||
- git submodule init tools/boostdep
|
||||
- git submodule init tools/boost_install
|
||||
- git submodule init libs/headers
|
||||
- git submodule init libs/config
|
||||
- git submodule init libs/parameter_python
|
||||
- git submodule update --jobs %GIT_FETCH_JOBS%
|
||||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\parameter
|
||||
- python tools/boostdep/depinst/depinst.py parameter
|
||||
- bootstrap
|
||||
- python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" parameter
|
||||
- cmd /c bootstrap
|
||||
- b2 headers
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- cd libs\parameter\test
|
||||
- ..\..\..\b2 -j%NUMBER_OF_PROCESSORS% --hash %ARGS%
|
||||
- cd ..\..\..
|
||||
- b2 -j %NUMBER_OF_PROCESSORS% libs/parameter/test %ARGS%
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef ARG_LIST_050329_HPP
|
||||
#define ARG_LIST_050329_HPP
|
||||
#ifndef BOOST_PARAMETER_AUX_ARG_LIST_HPP
|
||||
#define BOOST_PARAMETER_AUX_ARG_LIST_HPP
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
@@ -599,7 +599,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
template <typename KW>
|
||||
static ::boost::parameter::aux::no_tag has_key(KW*);
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// The overload set technique doesn't work with these older compilers,
|
||||
// so they need some explicit handholding.
|
||||
|
||||
@@ -670,7 +670,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#endif
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/parameter/aux_/preprocessor/nullptr.hpp>
|
||||
#endif
|
||||
|
||||
@@ -767,7 +767,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
};
|
||||
};
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// Overload for key_type, so the assert below will fire
|
||||
// if the same keyword is used again.
|
||||
static ::boost::parameter::aux::yes_tag has_key(key_type*);
|
||||
@@ -827,7 +827,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
}
|
||||
|
||||
public:
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// These older compilers don't support the overload set creation
|
||||
// idiom well, so we need to do all the return type calculation
|
||||
// for the compiler and dispatch through an outer function template.
|
||||
@@ -927,7 +927,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
{
|
||||
return this->arg.get_value();
|
||||
}
|
||||
#else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#else // !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
inline BOOST_CONSTEXPR reference
|
||||
operator[](::boost::parameter::keyword<key_type> const&) const
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef DEFAULT_050329_HPP
|
||||
#define DEFAULT_050329_HPP
|
||||
#ifndef BOOST_PARAMETER_AUX_DEFAULT_HPP
|
||||
#define BOOST_PARAMETER_AUX_DEFAULT_HPP
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
@@ -91,6 +91,17 @@ namespace boost { namespace parameter { namespace aux {
|
||||
{
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
|
||||
// MSVC 2015 miscompiles moves for classes containing rvalue ref members
|
||||
// using the default generated move constructor
|
||||
// when moving into a function
|
||||
// https://github.com/boostorg/parameter/pull/109
|
||||
inline BOOST_CONSTEXPR default_r_(default_r_&& x)
|
||||
: value(::std::forward<Value>(x.value))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
Value&& value;
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
#else // !defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
#include <boost/type_traits/add_lvalue_reference.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#endif
|
||||
#endif // BOOST_PARAMETER_CAN_USE_MP11
|
||||
@@ -64,7 +64,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
typename ::std::add_const<T>::type
|
||||
#else // !defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
typedef typename ::boost::add_lvalue_reference<
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
T const
|
||||
#else
|
||||
typename ::boost::add_const<T>::type
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
#include <boost/parameter/aux_/lambda_tag.hpp>
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/bind.hpp>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#endif
|
||||
@@ -26,7 +26,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
struct item
|
||||
{
|
||||
typedef Spec spec;
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
typedef ::boost::is_const<
|
||||
typename ::boost::remove_reference<Arg>::type
|
||||
> is_arg_const;
|
||||
|
||||
@@ -75,19 +75,19 @@ namespace boost { namespace parameter { namespace aux {
|
||||
, typename IsPositional
|
||||
, typename UsedArgs
|
||||
, typename ArgumentPack
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
, typename _argument
|
||||
#endif
|
||||
, typename Error
|
||||
, typename EmitsErrors
|
||||
>
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
class make_arg_list00
|
||||
#else
|
||||
class make_arg_list0
|
||||
#endif
|
||||
{
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
typedef typename List::arg _argument;
|
||||
#endif
|
||||
#if defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
@@ -290,7 +290,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
>::type type;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
template <
|
||||
typename List
|
||||
, typename DeducedArgs
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
template <
|
||||
typename Keyword
|
||||
, typename ActualArg
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
, typename = typename ::boost::parameter::aux
|
||||
::is_cv_reference_wrapper<ActualArg>::type
|
||||
#endif
|
||||
@@ -30,7 +30,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
};
|
||||
}}} // namespace boost::parameter::aux_
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef PARAMETER_REQUIREMENTS_050331_HPP
|
||||
#define PARAMETER_REQUIREMENTS_050331_HPP
|
||||
#ifndef BOOST_PARAMETER_AUX_PARAMETER_REQUIREMENTS_HPP
|
||||
#define BOOST_PARAMETER_AUX_PARAMETER_REQUIREMENTS_HPP
|
||||
|
||||
#include <boost/parameter/aux_/pack/parameter_requirements.hpp>
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
}
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#elif BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#define BOOST_PARAMETER_FUNCTION_CAST_T(value_t, predicate, args) value_t
|
||||
#define BOOST_PARAMETER_FUNCTION_CAST_B(value, predicate, args) value
|
||||
#else // no perfect forwarding support and no Borland workarounds needed
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <boost/parameter/config.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
|
||||
#include <boost/parameter/aux_/pp_impl/match.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
|
||||
#include <boost/parameter/aux_/use_default.hpp>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
>
|
||||
/**/
|
||||
|
||||
#else // !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#else // !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
|
||||
#include <boost/parameter/aux_/pp_impl/unwrap_predicate.hpp>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// From Paul Mensonides
|
||||
#include <boost/preprocessor/punctuation/comma.hpp>
|
||||
#include <boost/preprocessor/detail/split.hpp>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// From Paul Mensonides
|
||||
#include <boost/preprocessor/punctuation/comma.hpp>
|
||||
#include <boost/preprocessor/detail/split.hpp>
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
};
|
||||
}}} // namespace boost::parameter::aux
|
||||
|
||||
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#elif BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/mpl/list.hpp>
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
template <
|
||||
typename Keyword
|
||||
, typename Arg
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
, typename = typename ::boost::parameter::aux
|
||||
::is_cv_reference_wrapper<Arg>::type
|
||||
#endif
|
||||
@@ -138,7 +138,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
};
|
||||
}}} // namespace boost::parameter::aux_
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
|
||||
@@ -295,6 +295,15 @@ namespace boost { namespace parameter { namespace aux {
|
||||
return this->get_value();
|
||||
}
|
||||
|
||||
template <typename Default>
|
||||
inline BOOST_CONSTEXPR reference
|
||||
operator[](
|
||||
::boost::parameter::aux::default_r_<key_type,Default> const&
|
||||
) const
|
||||
{
|
||||
return this->get_value();
|
||||
}
|
||||
|
||||
template <typename F>
|
||||
inline BOOST_CONSTEXPR reference
|
||||
operator[](
|
||||
@@ -662,7 +671,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
::boost::parameter::aux::tagged_argument<Keyword,Arg>
|
||||
, ::boost::parameter::aux::arg_list<
|
||||
::boost::parameter::aux::tagged_argument<Keyword2,Arg2>
|
||||
>
|
||||
>
|
||||
>
|
||||
operator,(
|
||||
::boost::parameter::aux
|
||||
@@ -673,7 +682,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
::boost::parameter::aux::tagged_argument<Keyword,Arg>
|
||||
, ::boost::parameter::aux::arg_list<
|
||||
::boost::parameter::aux::tagged_argument<Keyword2,Arg2>
|
||||
>
|
||||
>
|
||||
>(
|
||||
*this
|
||||
, ::boost::parameter::aux::arg_list<
|
||||
@@ -695,7 +704,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
}
|
||||
|
||||
#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || \
|
||||
BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
template <typename KW, typename Default>
|
||||
inline BOOST_CONSTEXPR Default&
|
||||
get_with_default(
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UNWRAP_CV_REFERENCE_050328_HPP
|
||||
#define UNWRAP_CV_REFERENCE_050328_HPP
|
||||
#ifndef BOOST_PARAMETER_AUX_UNWRAP_CV_REFERENCE_HPP
|
||||
#define BOOST_PARAMETER_AUX_UNWRAP_CV_REFERENCE_HPP
|
||||
|
||||
namespace boost {
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace boost { namespace parameter { namespace aux {
|
||||
#else // !defined(BOOST_PARAMETER_CAN_USE_MP11) || MSVC-14.0
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
|
||||
!BOOST_WORKAROUND(BOOST_GCC, < 40000)
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#endif
|
||||
@@ -119,13 +119,13 @@ namespace boost { namespace parameter { namespace aux {
|
||||
);
|
||||
|
||||
typedef boost::mpl::bool_<
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
is_cv_reference_wrapper::
|
||||
#endif
|
||||
value> type;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || \
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) || \
|
||||
BOOST_WORKAROUND(BOOST_GCC, < 40000)
|
||||
template <
|
||||
typename T
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef YESNO_050328_HPP
|
||||
#define YESNO_050328_HPP
|
||||
#ifndef BOOST_PARAMETER_AUX_YESNO_HPP
|
||||
#define BOOST_PARAMETER_AUX_YESNO_HPP
|
||||
|
||||
namespace boost { namespace parameter { namespace aux {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
|
||||
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
|
||||
!defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && !( \
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && !( \
|
||||
defined(BOOST_CLANG) && (1 == BOOST_CLANG) && ( \
|
||||
(__clang_major__ < 3) || ( \
|
||||
(3 == __clang_major__) && (__clang_minor__ < 2) \
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef KEYWORD_050328_HPP
|
||||
#define KEYWORD_050328_HPP
|
||||
#ifndef BOOST_PARAMETER_KEYWORD_HPP
|
||||
#define BOOST_PARAMETER_KEYWORD_HPP
|
||||
|
||||
#include <boost/parameter/aux_/tag.hpp>
|
||||
#include <boost/parameter/aux_/default.hpp>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
|
||||
#define BOOST_PARAMETER_MATCH_TYPE(n, param) \
|
||||
, typename param::match<BOOST_PP_ENUM_PARAMS(n, T)>::type kw = param()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <boost/parameter/config.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/parameter/aux_/void.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#include <boost/preprocessor/facilities/intercept.hpp>
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace boost { namespace parameter {
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
#include <boost/parameter/aux_/pack/tag_keyword_arg.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
@@ -314,7 +314,7 @@ namespace boost { namespace parameter {
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#else
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
@@ -345,7 +345,7 @@ namespace boost { namespace parameter {
|
||||
// parameters. Otherwise, this is not a valid metafunction
|
||||
// (no nested ::type).
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
// If NamedList satisfies the PS0, PS1, ..., this is a metafunction
|
||||
// returning parameters. Otherwise it has no nested ::type.
|
||||
template <typename ArgumentPackAndError>
|
||||
@@ -386,7 +386,7 @@ namespace boost { namespace parameter {
|
||||
// Specializations are to be used as an optional argument
|
||||
// to eliminate overloads via SFINAE.
|
||||
template <
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// Borland simply can't handle default arguments in member
|
||||
// class templates. People wishing to write portable code can
|
||||
// explicitly specify BOOST_PARAMETER_MAX_ARITY arguments.
|
||||
@@ -401,7 +401,7 @@ namespace boost { namespace parameter {
|
||||
>
|
||||
struct match
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
: ::boost::parameter::parameters<
|
||||
BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, PS)
|
||||
>::BOOST_NESTED_TEMPLATE match_base<
|
||||
@@ -434,7 +434,7 @@ namespace boost { namespace parameter {
|
||||
// of make_arg_list.
|
||||
|
||||
template <
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
// Borland simply can't handle default arguments in member
|
||||
// class templates. People wishing to write portable code can
|
||||
// explicitly specify BOOST_PARAMETER_MAX_ARITY arguments.
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
"maintainers": [
|
||||
"David Abrahams <dave -at- boost-consulting.com>",
|
||||
"Daniel Wallin <daniel -at- boostpro.com>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
||||
@@ -8,20 +8,30 @@
|
||||
# TODO: Also process literate tests
|
||||
file(GLOB test_files *.cpp)
|
||||
|
||||
# remove some test for which the dependencies are not yet available or have special requirements
|
||||
# remove some test for which the dependencies are not yet available or have
|
||||
# special requirements
|
||||
# TODO: enable more tests
|
||||
list(FILTER test_files EXCLUDE REGEX
|
||||
efficiency|deduced_unmatched_arg|python_test|duplicates)
|
||||
|
||||
# Attach all our tests to the `tests` target, to enable
|
||||
# `cmake --build . --target tests`
|
||||
if(NOT TARGET tests)
|
||||
add_custom_target(tests)
|
||||
endif()
|
||||
|
||||
foreach(file IN LISTS test_files)
|
||||
|
||||
get_filename_component(core_name ${file} NAME_WE)
|
||||
set(test_name test_boost_parameter_${core_name})
|
||||
set(test_name boost_parameter-test-${core_name})
|
||||
|
||||
add_executable(${test_name} ${file})
|
||||
# add Boost.Parameter and any libraries that are only needed by the tests (none at the moment)
|
||||
add_executable(${test_name} EXCLUDE_FROM_ALL ${file})
|
||||
add_dependencies(tests ${test_name})
|
||||
|
||||
# add Boost.Parameter and any libraries that are only needed by the tests
|
||||
# (none at the moment)
|
||||
target_link_libraries(${test_name} Boost::parameter)
|
||||
|
||||
add_test(NAME ${test_name} COMMAND ${test_name})
|
||||
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
120
test/Jamfile.v2
120
test/Jamfile.v2
@@ -6,6 +6,7 @@
|
||||
|
||||
# Boost Parameter Library test Jamfile
|
||||
|
||||
import os ;
|
||||
import testing ;
|
||||
|
||||
project boost/parameter
|
||||
@@ -492,68 +493,75 @@ alias parameter_literate_tests
|
||||
]
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for clang on linux with cxxstd set to 14
|
||||
<target-os>linux
|
||||
<toolset>clang
|
||||
<cxxstd>14
|
||||
;
|
||||
if ! [ os.environ BOOST_PARAMETER_TEST_WITHOUT_PYTHON_TESTS ]
|
||||
{
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for clang on linux with cxxstd set to 14
|
||||
<target-os>linux
|
||||
<toolset>clang
|
||||
<cxxstd>14
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for clang on linux with cxxstd set to 1z
|
||||
<target-os>linux
|
||||
<toolset>clang
|
||||
<cxxstd>1z
|
||||
;
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for clang on linux with cxxstd set to 1z
|
||||
<target-os>linux
|
||||
<toolset>clang
|
||||
<cxxstd>1z
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for xcode 8.3.0 on osx
|
||||
# so we turn off this test for this compiler completely for now
|
||||
<target-os>darwin
|
||||
# TODO: Differentiate by xcode version or by clang version
|
||||
;
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for xcode 8.3.0 on osx
|
||||
# so we turn off this test for this compiler completely for now
|
||||
<target-os>darwin
|
||||
# TODO: Differentiate by xcode version or by clang version
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for mingw compilers with cxxstd set to 11 or higher
|
||||
# because of a Python header problem
|
||||
# so we turn off this test for this compiler completely
|
||||
<target-os>windows
|
||||
<toolset>gcc
|
||||
<address-model>32
|
||||
;
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for mingw compilers with cxxstd set to 11 or higher
|
||||
# because of a Python header problem
|
||||
# so we turn off this test for this compiler completely
|
||||
<target-os>windows
|
||||
<toolset>gcc
|
||||
<address-model>32
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for clang-linux compilers with cxxstd set to 11 or higher
|
||||
# because of a Python header problem
|
||||
# so we turn off this test for this compiler completely
|
||||
<target-os>windows
|
||||
<toolset>clang-linux
|
||||
<address-model>32
|
||||
;
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for clang-linux compilers with cxxstd set to 11 or higher
|
||||
# because of a Python header problem
|
||||
# so we turn off this test for this compiler completely
|
||||
<target-os>windows
|
||||
<toolset>clang-linux
|
||||
<address-model>32
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for windows compilers with 64-bit addressing set
|
||||
# because of a Python header problem
|
||||
<target-os>windows
|
||||
<address-model>64
|
||||
;
|
||||
alias parameter_python_test
|
||||
:
|
||||
:
|
||||
# Python fails for windows compilers with 64-bit addressing set
|
||||
# because of a Python header problem
|
||||
<target-os>windows
|
||||
<address-model>64
|
||||
;
|
||||
|
||||
alias parameter_python_test
|
||||
:
|
||||
[ bpl-test python_test ]
|
||||
;
|
||||
alias parameter_python_test
|
||||
:
|
||||
[ bpl-test python_test ]
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
alias parameter_python_test ;
|
||||
}
|
||||
|
||||
alias parameter_macros_eval_category
|
||||
:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/parameter.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include "basics.hpp"
|
||||
|
||||
namespace test {
|
||||
@@ -97,7 +97,7 @@ int main()
|
||||
, test::_name = std::string("foo")
|
||||
);
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
x = 56;
|
||||
test::f_list((
|
||||
test::_tester = test::values(std::string("foo"), 666.222, 56)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BASICS_050424_HPP
|
||||
#define BASICS_050424_HPP
|
||||
#ifndef BOOST_PARAMETER_TEST_BASICS_HPP
|
||||
#define BOOST_PARAMETER_TEST_BASICS_HPP
|
||||
|
||||
#include <boost/parameter.hpp>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#else
|
||||
#include <boost/type_traits/add_lvalue_reference.hpp>
|
||||
@@ -54,7 +54,7 @@ int main()
|
||||
#else // !defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
, boost::mpl::if_<
|
||||
boost::is_same<
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
boost::mpl::_1
|
||||
, boost::remove_reference<
|
||||
boost::parameter::binding<
|
||||
@@ -92,7 +92,7 @@ int main()
|
||||
#else // !defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
, boost::mpl::if_<
|
||||
boost::is_same<
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
boost::mpl::_1
|
||||
, boost::remove_reference<
|
||||
boost::parameter::binding<
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <boost/parameter.hpp>
|
||||
#include <boost/parameter/macros.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include "basics.hpp"
|
||||
|
||||
namespace test {
|
||||
@@ -38,7 +38,7 @@ namespace test {
|
||||
}
|
||||
} // namespace test
|
||||
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/core/ref.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <string>
|
||||
|
||||
@@ -65,4 +65,3 @@ int main()
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/parameter/config.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if (BOOST_PARAMETER_MAX_ARITY < 2)
|
||||
#error Define BOOST_PARAMETER_MAX_ARITY as 2 or greater.
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace test {
|
||||
, A1
|
||||
, A2
|
||||
, A3
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
, boost::parameter::void_
|
||||
#endif
|
||||
>::type args;
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace test {
|
||||
>::value
|
||||
, "remove_cref<index_type>::type == int"
|
||||
);
|
||||
#elif !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
||||
#elif !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
|
||||
!BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
BOOST_MPL_ASSERT((
|
||||
typename boost::mpl::if_<
|
||||
@@ -181,7 +181,7 @@ namespace test {
|
||||
>::value
|
||||
, "remove_cref<index_type>::type == int"
|
||||
);
|
||||
#elif !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
|
||||
#elif !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \
|
||||
!BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
BOOST_MPL_ASSERT((
|
||||
typename boost::mpl::if_<
|
||||
@@ -663,7 +663,7 @@ int main()
|
||||
BOOST_TEST(!p_const(test::_index = 3, test::_value = 4));
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
// GCC 3- tries to bind string literals
|
||||
// to non-const references to char const*.
|
||||
// BOOST_TEST(test::sfinae("foo") == 1);
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace test {
|
||||
} // namespace test
|
||||
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
#include <boost/core/enable_if.hpp>
|
||||
|
||||
#if !defined(BOOST_PARAMETER_CAN_USE_MP11)
|
||||
@@ -166,7 +166,7 @@ int main()
|
||||
test::f("foo", 3.f);
|
||||
test::f(test::value = 3.f, test::name = "foo");
|
||||
#if !defined(BOOST_NO_SFINAE) && \
|
||||
!BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
|
||||
!BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x592))
|
||||
BOOST_TEST_EQ(0, test::f(3, 4));
|
||||
#endif
|
||||
return boost::report_errors();
|
||||
|
||||
Reference in New Issue
Block a user