mirror of
https://github.com/boostorg/function.git
synced 2026-01-30 07:52:08 +00:00
Compare commits
3 Commits
feature/fu
...
feature/lw
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8f7bdb699 | ||
|
|
7c0dafc88e | ||
|
|
267243aa5c |
84
.travis.yml
84
.travis.yml
@@ -6,6 +6,8 @@ language: cpp
|
|||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
python: "2.7"
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@@ -24,11 +26,11 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++
|
compiler: g++
|
||||||
env: TOOLSET=gcc CXXSTD=03,11 VARIANT=debug,release
|
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-4.4
|
compiler: g++-4.4
|
||||||
env: TOOLSET=gcc CXXSTD=98,0x
|
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -38,7 +40,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-4.6
|
compiler: g++-4.6
|
||||||
env: TOOLSET=gcc CXXSTD=03,0x
|
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -48,7 +50,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-4.7
|
compiler: g++-4.7
|
||||||
env: TOOLSET=gcc CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -58,7 +60,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-4.8
|
compiler: g++-4.8
|
||||||
env: TOOLSET=gcc CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -67,7 +69,7 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-4.9
|
compiler: g++-4.9
|
||||||
env: TOOLSET=gcc CXXSTD=03,11
|
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -77,7 +79,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-5
|
compiler: g++-5
|
||||||
env: TOOLSET=gcc CXXSTD=03,11,14,1z
|
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -87,7 +89,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-6
|
compiler: g++-6
|
||||||
env: TOOLSET=gcc CXXSTD=03,11,14,1z
|
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -97,7 +99,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-7
|
compiler: g++-7
|
||||||
env: TOOLSET=gcc CXXSTD=03,11,14,17 VARIANT=release
|
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -107,7 +109,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-8
|
compiler: g++-8
|
||||||
env: TOOLSET=gcc CXXSTD=03,11,14,17,2a
|
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -116,22 +118,22 @@ matrix:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: g++-7
|
compiler: g++-8
|
||||||
env: UBSAN=1 TOOLSET=gcc CXXSTD=03,11,14,17 UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- g++-7
|
- g++-8
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
env: TOOLSET=clang CXXSTD=03,11 VARIANT=debug,release
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: /usr/bin/clang++
|
compiler: /usr/bin/clang++
|
||||||
env: TOOLSET=clang CXXSTD=03,11
|
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -139,7 +141,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: /usr/bin/clang++
|
compiler: /usr/bin/clang++
|
||||||
env: TOOLSET=clang CXXSTD=03,11
|
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -147,7 +149,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-3.5
|
compiler: clang++-3.5
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -159,29 +161,31 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-3.6
|
compiler: clang++-3.6
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- clang-3.6
|
- clang-3.6
|
||||||
|
- libstdc++-4.9-dev
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-precise-3.6
|
- llvm-toolchain-precise-3.6
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-3.7
|
compiler: clang++-3.7
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- clang-3.7
|
- clang-3.7
|
||||||
|
- libstdc++-4.9-dev
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-precise-3.7
|
- llvm-toolchain-precise-3.7
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-3.8
|
compiler: clang++-3.8
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -193,7 +197,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-3.9
|
compiler: clang++-3.9
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -205,7 +209,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-4.0
|
compiler: clang++-4.0
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -216,7 +220,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-5.0
|
compiler: clang++-5.0
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z VARIANT=release
|
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -227,7 +231,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-6.0
|
compiler: clang++-6.0
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -237,30 +241,20 @@ matrix:
|
|||||||
- llvm-toolchain-trusty-6.0
|
- llvm-toolchain-trusty-6.0
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-7
|
compiler: clang++-6.0
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,17,2a
|
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- clang-7
|
- clang-6.0
|
||||||
|
- libstdc++-5-dev
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-7
|
- llvm-toolchain-trusty-6.0
|
||||||
|
|
||||||
- os: linux
|
|
||||||
compiler: clang++-5.0
|
|
||||||
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- clang-5.0
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- llvm-toolchain-trusty-5.0
|
|
||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-libc++
|
compiler: clang++-libc++
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z VARIANT=release
|
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -268,7 +262,7 @@ matrix:
|
|||||||
|
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang++-libc++
|
compiler: clang++-libc++
|
||||||
env: UBSAN=1 TOOLSET=clang CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -276,12 +270,12 @@ matrix:
|
|||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang++
|
compiler: clang++
|
||||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||||
- cd ..
|
- cd ..
|
||||||
- git clone -b $BOOST_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
|
- cd boost-root
|
||||||
- git submodule update --init tools/build
|
- git submodule update --init tools/build
|
||||||
- git submodule update --init libs/config
|
- git submodule update --init libs/config
|
||||||
@@ -293,8 +287,8 @@ install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- |-
|
- |-
|
||||||
echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
|
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||||
- ./b2 -j3 libs/function/test toolset=$TOOLSET cxxstd=$CXXSTD ${VARIANT:+variant=$VARIANT} ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
|
- ./b2 -j3 libs/function/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|||||||
73
appveyor.yml
73
appveyor.yml
@@ -3,22 +3,6 @@
|
|||||||
# Distributed under the Boost Software License, Version 1.0.
|
# 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)
|
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
#
|
|
||||||
# Generic Appveyor build script for boostorg repositories
|
|
||||||
# See: https://github.com/jeking3/boost-ci/
|
|
||||||
#
|
|
||||||
# Instructions for customizing this script for your library:
|
|
||||||
#
|
|
||||||
# 1. Customize the compilers and language levels you want.
|
|
||||||
# 2. If you have move than include/, src/, test/, example/, examples/,
|
|
||||||
# benchmark/ or tools/ directories, set the environment variable DEPINST.
|
|
||||||
# For example if your build uses code in "bench/" and "fog/" directories:
|
|
||||||
# - DEPINST: --include bench --include fog
|
|
||||||
# 3. Enable pull request builds in your boostorg/<library> account.
|
|
||||||
#
|
|
||||||
# That's it - the script will do everything else for you.
|
|
||||||
#
|
|
||||||
|
|
||||||
version: 1.0.{build}-{branch}
|
version: 1.0.{build}-{branch}
|
||||||
|
|
||||||
shallow_clone: true
|
shallow_clone: true
|
||||||
@@ -29,83 +13,58 @@ branches:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
# Adding MAYFAIL to any matrix job allows it to fail but the build stays green:
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- MAYFAIL: true
|
- MAYFAIL: true
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
global:
|
global:
|
||||||
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
|
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
|
||||||
# to use the default for a given environment, comment it out; recommend you build debug and release however:
|
# to use the default for a given environment, comment it out; recommend you build debug and release however..
|
||||||
# on Windows it is important to exercise all the possibilities, especially shared vs static, however most
|
# on Windows it is important to exercise all the possibilities, especially shared vs static
|
||||||
# libraries that care about this exercise it in their Jamfiles...
|
|
||||||
# B2_ADDRESS_MODEL: address-model=64,32
|
# B2_ADDRESS_MODEL: address-model=64,32
|
||||||
# B2_LINK: link=shared,static
|
# B2_LINK: link=shared,static
|
||||||
# B2_THREADING: threading=multi,single
|
# B2_THREADING: threading=multi,single
|
||||||
B2_VARIANT: variant=release,debug
|
B2_VARIANT: variant=release,debug
|
||||||
|
CXXSTD: 03
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- FLAVOR: Visual Studio 2017 C++2a Strict
|
- FLAVOR: Visual Studio 2017
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
||||||
TOOLSET: msvc-14.1
|
|
||||||
B2_ADDRESS_MODEL: address-model=64
|
|
||||||
CXXFLAGS: cxxflags=-permissive-
|
|
||||||
CXXSTD: latest # 2a
|
|
||||||
|
|
||||||
- FLAVOR: Visual Studio 2017 C++17
|
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
|
||||||
TOOLSET: msvc-14.1
|
|
||||||
B2_ADDRESS_MODEL: address-model=64
|
|
||||||
CXXSTD: 17
|
|
||||||
|
|
||||||
- FLAVOR: Visual Studio 2017 C++14 (Default)
|
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
TOOLSET: msvc-14.1
|
TOOLSET: msvc-14.1
|
||||||
B2_ADDRESS_MODEL: address-model=64,32
|
B2_ADDRESS_MODEL: address-model=64,32
|
||||||
|
- FLAVOR: Visual Studio 2015
|
||||||
- FLAVOR: Visual Studio 2015 C++14 (Default)
|
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
TOOLSET: msvc-14.0
|
TOOLSET: msvc-14.0
|
||||||
B2_ADDRESS_MODEL: address-model=64,32
|
B2_ADDRESS_MODEL: address-model=64,32
|
||||||
|
|
||||||
- FLAVOR: Visual Studio 2010, 2012, 2013
|
- FLAVOR: Visual Studio 2010, 2012, 2013
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
|
||||||
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
|
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
|
||||||
|
|
||||||
- FLAVOR: cygwin (32-bit)
|
- FLAVOR: cygwin (32-bit)
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
ADDPATH: C:\cygwin\bin;
|
ADDPATH: C:\cygwin\bin;
|
||||||
B2_ADDRESS_MODEL: address-model=32
|
B2_ADDRESS_MODEL: address-model=32
|
||||||
CXXSTD: 03,11
|
|
||||||
# https://github.com/boostorg/test/issues/144
|
# https://github.com/boostorg/test/issues/144
|
||||||
DEFINES: define=_POSIX_C_SOURCE=200112L
|
DEFINES: define=_POSIX_C_SOURCE=200112L
|
||||||
THREADING: threadapi=pthread
|
THREADING: threadapi=pthread
|
||||||
TOOLSET: gcc
|
TOOLSET: gcc
|
||||||
|
|
||||||
- FLAVOR: cygwin (64-bit)
|
- FLAVOR: cygwin (64-bit)
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
ADDPATH: C:\cygwin64\bin;
|
ADDPATH: C:\cygwin64\bin;
|
||||||
B2_ADDRESS_MODEL: address-model=64
|
B2_ADDRESS_MODEL: address-model=64
|
||||||
CXXSTD: 11,17
|
|
||||||
# https://github.com/boostorg/test/issues/144
|
# https://github.com/boostorg/test/issues/144
|
||||||
DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99
|
DEFINES: define=_POSIX_C_SOURCE=200112L
|
||||||
THREADING: threadapi=pthread
|
THREADING: threadapi=pthread
|
||||||
TOOLSET: gcc
|
TOOLSET: gcc
|
||||||
|
- FLAVOR: mingw32
|
||||||
- FLAVOR: mingw32
|
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
ARCH: i686
|
ARCH: i686
|
||||||
B2_ADDRESS_MODEL: address-model=32
|
B2_ADDRESS_MODEL: address-model=32
|
||||||
CXXSTD: 03,11
|
SCRIPT: ci\appveyor\mingw.bat
|
||||||
SCRIPT: ci\appveyor\mingw.bat
|
- FLAVOR: mingw64
|
||||||
|
|
||||||
- FLAVOR: mingw64
|
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
ARCH: x86_64
|
ARCH: x86_64
|
||||||
B2_ADDRESS_MODEL: address-model=64
|
B2_ADDRESS_MODEL: address-model=64
|
||||||
CXXSTD: 11,17
|
SCRIPT: ci\appveyor\mingw.bat
|
||||||
DEFINES: define=__USE_ISOC99
|
|
||||||
SCRIPT: ci\appveyor\mingw.bat
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
|
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
|
||||||
@@ -118,9 +77,5 @@ build: off
|
|||||||
test_script:
|
test_script:
|
||||||
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
|
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
|
||||||
- PATH=%ADDPATH%%PATH%
|
- PATH=%ADDPATH%%PATH%
|
||||||
# The definition of TOOLCXX omits CXXSTD= if it was not defined above
|
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF% toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
||||||
- IF NOT DEFINED CXXSTD (SET TOOLCXX=toolset=%TOOLSET%) ELSE (SET TOOLCXX=toolset=%TOOLSET% cxxstd=%CXXSTD%)
|
|
||||||
# Echo the complete build command to the build log
|
|
||||||
- IF NOT DEFINED SCRIPT (ECHO b2 libs/%SELF:\=/% %TOOLCXX% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
|
||||||
# Now go build...
|
|
||||||
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF:\=/% %TOOLCXX% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
# Distributed under the Boost Software License, Version 1.0. (See accompany-
|
# Distributed under the Boost Software License, Version 1.0. (See accompany-
|
||||||
# ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
# ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
import ../../config/checks/config : requires ;
|
|
||||||
import os ;
|
import os ;
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
@@ -14,7 +13,7 @@ project
|
|||||||
;
|
;
|
||||||
|
|
||||||
test-suite "function-examples"
|
test-suite "function-examples"
|
||||||
: [ run bind1st.cpp : : : [ requires cxx98_binders ] ]
|
: [ run bind1st.cpp ]
|
||||||
[ run int_div.cpp ]
|
[ run int_div.cpp ]
|
||||||
[ run sum_avg.cpp ]
|
[ run sum_avg.cpp ]
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace boost {
|
|||||||
} obj_ref;
|
} obj_ref;
|
||||||
};
|
};
|
||||||
|
|
||||||
union BOOST_SYMBOL_VISIBLE function_buffer
|
union function_buffer
|
||||||
{
|
{
|
||||||
// Type-specific union members
|
// Type-specific union members
|
||||||
mutable function_buffer_members members;
|
mutable function_buffer_members members;
|
||||||
@@ -710,7 +710,7 @@ public: // should be protected, but GCC 2.95.3 will fail to allow access
|
|||||||
* The bad_function_call exception class is thrown when a boost::function
|
* The bad_function_call exception class is thrown when a boost::function
|
||||||
* object is invoked
|
* object is invoked
|
||||||
*/
|
*/
|
||||||
class BOOST_SYMBOL_VISIBLE bad_function_call : public std::runtime_error
|
class bad_function_call : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bad_function_call() : std::runtime_error("call to empty boost::function") {}
|
bad_function_call() : std::runtime_error("call to empty boost::function") {}
|
||||||
|
|||||||
@@ -29,7 +29,8 @@
|
|||||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||||
# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a)
|
# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a)
|
||||||
#else
|
#else
|
||||||
# define BOOST_FUNCTION_ARG(J,I,D) static_cast<BOOST_PP_CAT(T,I)&&>(BOOST_PP_CAT(a,I))
|
# include <boost/move/utility_core.hpp>
|
||||||
|
# define BOOST_FUNCTION_ARG(J,I,D) ::boost::forward< BOOST_PP_CAT(T,I) >(BOOST_PP_CAT(a,I))
|
||||||
# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY)
|
# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -349,8 +350,9 @@ namespace boost {
|
|||||||
typedef functor_manager<FunctionPtr> manager_type;
|
typedef functor_manager<FunctionPtr> manager_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename FunctionPtr, typename Allocator,
|
template<typename FunctionPtr,
|
||||||
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
|
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
|
||||||
|
typename Allocator>
|
||||||
struct apply_a
|
struct apply_a
|
||||||
{
|
{
|
||||||
typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
|
typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
|
||||||
@@ -383,8 +385,9 @@ namespace boost {
|
|||||||
typedef functor_manager<MemberPtr> manager_type;
|
typedef functor_manager<MemberPtr> manager_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename MemberPtr, typename Allocator,
|
template<typename MemberPtr,
|
||||||
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
|
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
|
||||||
|
typename Allocator>
|
||||||
struct apply_a
|
struct apply_a
|
||||||
{
|
{
|
||||||
typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
|
typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
|
||||||
@@ -417,8 +420,9 @@ namespace boost {
|
|||||||
typedef functor_manager<FunctionObj> manager_type;
|
typedef functor_manager<FunctionObj> manager_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename FunctionObj, typename Allocator,
|
template<typename FunctionObj,
|
||||||
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
|
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
|
||||||
|
typename Allocator>
|
||||||
struct apply_a
|
struct apply_a
|
||||||
{
|
{
|
||||||
typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
|
typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
|
||||||
@@ -450,8 +454,9 @@ namespace boost {
|
|||||||
typedef reference_manager<typename RefWrapper::type> manager_type;
|
typedef reference_manager<typename RefWrapper::type> manager_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename RefWrapper, typename Allocator,
|
template<typename RefWrapper,
|
||||||
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
|
typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
|
||||||
|
typename Allocator>
|
||||||
struct apply_a
|
struct apply_a
|
||||||
{
|
{
|
||||||
typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
|
typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
|
||||||
@@ -703,7 +708,7 @@ namespace boost {
|
|||||||
|
|
||||||
typedef BOOST_FUNCTION_FUNCTION self_type;
|
typedef BOOST_FUNCTION_FUNCTION self_type;
|
||||||
|
|
||||||
BOOST_DEFAULTED_FUNCTION(BOOST_FUNCTION_FUNCTION(), : function_base() {})
|
BOOST_FUNCTION_FUNCTION() : function_base() { }
|
||||||
|
|
||||||
// MSVC chokes if the following two constructors are collapsed into
|
// MSVC chokes if the following two constructors are collapsed into
|
||||||
// one with a default parameter.
|
// one with a default parameter.
|
||||||
@@ -950,8 +955,9 @@ namespace boost {
|
|||||||
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
|
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
|
||||||
typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
|
typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
|
||||||
typedef typename get_invoker::
|
typedef typename get_invoker::
|
||||||
template apply_a<Functor, Allocator, R BOOST_FUNCTION_COMMA
|
template apply_a<Functor, R BOOST_FUNCTION_COMMA
|
||||||
BOOST_FUNCTION_TEMPLATE_ARGS>
|
BOOST_FUNCTION_TEMPLATE_ARGS,
|
||||||
|
Allocator>
|
||||||
handler_type;
|
handler_type;
|
||||||
|
|
||||||
typedef typename handler_type::invoker_type invoker_type;
|
typedef typename handler_type::invoker_type invoker_type;
|
||||||
@@ -1040,7 +1046,7 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
|
|||||||
#if BOOST_FUNCTION_NUM_ARGS == 0
|
#if BOOST_FUNCTION_NUM_ARGS == 0
|
||||||
#define BOOST_FUNCTION_PARTIAL_SPEC R (void)
|
#define BOOST_FUNCTION_PARTIAL_SPEC R (void)
|
||||||
#else
|
#else
|
||||||
#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_FUNCTION_TEMPLATE_ARGS)
|
#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename R BOOST_FUNCTION_COMMA
|
template<typename R BOOST_FUNCTION_COMMA
|
||||||
@@ -1055,7 +1061,7 @@ class function<BOOST_FUNCTION_PARTIAL_SPEC>
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BOOST_DEFAULTED_FUNCTION(function(), : base_type() {})
|
function() : base_type() {}
|
||||||
|
|
||||||
template<typename Functor>
|
template<typename Functor>
|
||||||
function(Functor f
|
function(Functor f
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
run function_test.cpp ;
|
run function_test.cpp ;
|
||||||
# /usr/include/c++/4.4/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
|
|
||||||
run function_test.cpp : : : <rtti>off <toolset>gcc-4.4.7,<cxxstd>0x:<build>no : function_test_no_rtti ;
|
run function_test.cpp : : : <rtti>off <toolset>gcc-4.4.7,<cxxstd>0x:<build>no : function_test_no_rtti ;
|
||||||
run function_n_test.cpp ;
|
run function_n_test.cpp ;
|
||||||
run allocator_test.cpp ;
|
run allocator_test.cpp ;
|
||||||
@@ -36,24 +35,3 @@ run nothrow_swap.cpp ;
|
|||||||
run rvalues_test.cpp ;
|
run rvalues_test.cpp ;
|
||||||
compile function_typeof_test.cpp ;
|
compile function_typeof_test.cpp ;
|
||||||
run result_arg_types_test.cpp ;
|
run result_arg_types_test.cpp ;
|
||||||
|
|
||||||
lib throw_bad_function_call : throw_bad_function_call.cpp : <link>shared:<define>THROW_BAD_FUNCTION_CALL_DYN_LINK=1 ;
|
|
||||||
|
|
||||||
run test_bad_function_call.cpp throw_bad_function_call : : : <link>shared : test_bad_function_call_shared ;
|
|
||||||
run test_bad_function_call.cpp throw_bad_function_call : : : <link>static : test_bad_function_call_static ;
|
|
||||||
|
|
||||||
lib mixed_cxxstd : mixed_cxxstd.cpp : <link>shared:<define>MIXED_CXXSTD_DYN_LINK=1 ;
|
|
||||||
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd : : : <link>shared : mixed_cxxstd_shared ;
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd : : : <link>static : mixed_cxxstd_static ;
|
|
||||||
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd/<cxxstd>98 : : : <link>shared : mixed_cxxstd_shared_98 ;
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd/<cxxstd>98 : : : <link>static : mixed_cxxstd_static_98 ;
|
|
||||||
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd/<cxxstd>0x : : : <link>shared : mixed_cxxstd_shared_0x ;
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd/<cxxstd>0x : : : <link>static : mixed_cxxstd_static_0x ;
|
|
||||||
|
|
||||||
local check14 = [ check-target-builds mixed_cxxstd/<cxxstd>14 : : <build>no ] ;
|
|
||||||
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd/<cxxstd>14 : : : <link>shared $(check14) : mixed_cxxstd_shared_14 ;
|
|
||||||
run test_mixed_cxxstd.cpp mixed_cxxstd/<cxxstd>14 : : : <link>static $(check14) : mixed_cxxstd_static_14 ;
|
|
||||||
|
|||||||
@@ -631,7 +631,7 @@ test_ref()
|
|||||||
boost::function2<int, int, int> f(ref(atc));
|
boost::function2<int, int, int> f(ref(atc));
|
||||||
BOOST_CHECK(f(1, 3) == 4);
|
BOOST_CHECK(f(1, 3) == 4);
|
||||||
}
|
}
|
||||||
catch(std::runtime_error const&) {
|
catch(std::runtime_error e) {
|
||||||
BOOST_ERROR("Nonthrowing constructor threw an exception");
|
BOOST_ERROR("Nonthrowing constructor threw an exception");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ test_ref()
|
|||||||
boost::function<int (int, int)> f(boost::ref(atc));
|
boost::function<int (int, int)> f(boost::ref(atc));
|
||||||
BOOST_CHECK(f(1, 3) == 4);
|
BOOST_CHECK(f(1, 3) == 4);
|
||||||
}
|
}
|
||||||
catch(std::runtime_error const&) {
|
catch(std::runtime_error e) {
|
||||||
BOOST_ERROR("Nonthrowing constructor threw an exception");
|
BOOST_ERROR("Nonthrowing constructor threw an exception");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -651,14 +651,14 @@ static void test_empty_ref()
|
|||||||
f2();
|
f2();
|
||||||
BOOST_ERROR("Exception didn't throw for reference to empty function.");
|
BOOST_ERROR("Exception didn't throw for reference to empty function.");
|
||||||
}
|
}
|
||||||
catch(std::runtime_error const&) {}
|
catch(std::runtime_error e) {}
|
||||||
|
|
||||||
f1 = dummy;
|
f1 = dummy;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
f2();
|
f2();
|
||||||
}
|
}
|
||||||
catch(std::runtime_error const&) {
|
catch(std::runtime_error e) {
|
||||||
BOOST_ERROR("Error calling referenced function.");
|
BOOST_ERROR("Error calling referenced function.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -673,7 +673,7 @@ static void test_exception()
|
|||||||
f(5, 4);
|
f(5, 4);
|
||||||
BOOST_CHECK(false);
|
BOOST_CHECK(false);
|
||||||
}
|
}
|
||||||
catch(boost::bad_function_call const&) {
|
catch(boost::bad_function_call) {
|
||||||
// okay
|
// okay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
|
|
||||||
// Copyright 2018 Peter Dimov.
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(MIXED_CXXSTD_DYN_LINK)
|
|
||||||
# define EXPORT BOOST_SYMBOL_EXPORT
|
|
||||||
#else
|
|
||||||
# define EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EXPORT void call_fn_1( boost::function<void()> const & fn )
|
|
||||||
{
|
|
||||||
fn();
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT void call_fn_2( boost::function<void(int)> const & fn )
|
|
||||||
{
|
|
||||||
fn( 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT void call_fn_3( boost::function<void(int, int)> const & fn )
|
|
||||||
{
|
|
||||||
fn( 1, 2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT void call_fn_4( boost::function0<void> const & fn )
|
|
||||||
{
|
|
||||||
fn();
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT void call_fn_5( boost::function1<void, int> const & fn )
|
|
||||||
{
|
|
||||||
fn( 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT void call_fn_6( boost::function2<void, int, int> const & fn )
|
|
||||||
{
|
|
||||||
fn( 1, 2 );
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
// Copyright 2018 Peter Dimov.
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
|
||||||
|
|
||||||
void throw_bad_function_call();
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
BOOST_TEST_THROWS( throw_bad_function_call(), boost::bad_function_call );
|
|
||||||
return boost::report_errors();
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
|
|
||||||
// Copyright 2018 Peter Dimov.
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
#include <boost/core/lightweight_test.hpp>
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
void call_fn_1( boost::function<void()> const & fn );
|
|
||||||
void call_fn_2( boost::function<void(int)> const & fn );
|
|
||||||
void call_fn_3( boost::function<void(int, int)> const & fn );
|
|
||||||
|
|
||||||
void call_fn_4( boost::function0<void> const & fn );
|
|
||||||
void call_fn_5( boost::function1<void, int> const & fn );
|
|
||||||
void call_fn_6( boost::function2<void, int, int> const & fn );
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
static int v;
|
|
||||||
|
|
||||||
void f0()
|
|
||||||
{
|
|
||||||
v = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void f1( int x )
|
|
||||||
{
|
|
||||||
v = x;
|
|
||||||
}
|
|
||||||
|
|
||||||
void f2( int x, int y )
|
|
||||||
{
|
|
||||||
v = x + y;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
v = 0; call_fn_1( f0 ); BOOST_TEST_EQ( v, -1 );
|
|
||||||
v = 0; call_fn_2( f1 ); BOOST_TEST_EQ( v, 1 );
|
|
||||||
v = 0; call_fn_3( f2 ); BOOST_TEST_EQ( v, 3 );
|
|
||||||
|
|
||||||
v = 0; call_fn_4( f0 ); BOOST_TEST_EQ( v, -1 );
|
|
||||||
v = 0; call_fn_5( f1 ); BOOST_TEST_EQ( v, 1 );
|
|
||||||
v = 0; call_fn_6( f2 ); BOOST_TEST_EQ( v, 3 );
|
|
||||||
|
|
||||||
return boost::report_errors();
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
|
|
||||||
// Copyright 2018 Peter Dimov.
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
|
|
||||||
#include <boost/function.hpp>
|
|
||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
#if defined(THROW_BAD_FUNCTION_CALL_DYN_LINK)
|
|
||||||
# define EXPORT BOOST_SYMBOL_EXPORT
|
|
||||||
#else
|
|
||||||
# define EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EXPORT void throw_bad_function_call()
|
|
||||||
{
|
|
||||||
throw boost::bad_function_call();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user