forked from boostorg/throw_exception
Compare commits
49 Commits
feature/te
...
boost-1.78
Author | SHA1 | Date | |
---|---|---|---|
8c7b14f68b | |||
37ad7254d2 | |||
f6055628e6 | |||
65eddbb2f0 | |||
121c1407fd | |||
5eff93e41b | |||
8787d13e65 | |||
0a922307ec | |||
9ca27bddfc | |||
1d555aff4b | |||
b432f24664 | |||
9f6a2e7b89 | |||
95e02ea52b | |||
834a4f04dc | |||
ad30f163ef | |||
b1f6a8b25f | |||
264ee74b64 | |||
5b675bbc9c | |||
9c0a5b810b | |||
5e6223c838 | |||
f3b43b5679 | |||
397bc3d675 | |||
6360fb6f36 | |||
bd5f6a255f | |||
9f37f214ed | |||
3144a406d4 | |||
3d08795778 | |||
e0e262cc01 | |||
da6f5420fe | |||
924eb33335 | |||
37f7c5fd30 | |||
a9ea585926 | |||
548084bd4c | |||
237c7a35d6 | |||
3cd085a324 | |||
50a43b9512 | |||
e452a9ee16 | |||
86e09cc261 | |||
914d5a2ad3 | |||
9c6c409ada | |||
38d5273ad7 | |||
cab10beccd | |||
36f998f9b2 | |||
bc6f095b3d | |||
ac72b396f5 | |||
9e8a607ad9 | |||
fdf6b240f5 | |||
81e3072d04 | |||
fe38fbc5cf |
198
.github/workflows/ci.yml
vendored
Normal file
198
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,198 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- feature/**
|
||||
|
||||
env:
|
||||
UBSAN_OPTIONS: print_stacktrace=1
|
||||
|
||||
jobs:
|
||||
posix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: gcc-4.8
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-18.04
|
||||
install: g++-4.8
|
||||
- toolset: gcc-5
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-18.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
|
||||
- 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-20.04
|
||||
- toolset: gcc-10
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: g++-10
|
||||
- toolset: gcc-11
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: g++-11
|
||||
- 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
|
||||
- toolset: clang
|
||||
compiler: clang++-8
|
||||
cxxstd: "03,11,14,17"
|
||||
os: ubuntu-20.04
|
||||
install: clang-8
|
||||
- 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,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-10
|
||||
- toolset: clang
|
||||
compiler: clang++-11
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-11
|
||||
- toolset: clang
|
||||
compiler: clang++-12
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: ubuntu-20.04
|
||||
install: clang-12
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: macos-10.15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
run: sudo apt install ${{matrix.install}}
|
||||
|
||||
- name: Setup Boost
|
||||
run: |
|
||||
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||
echo LIBRARY: $LIBRARY
|
||||
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||
echo GITHUB_REF: $GITHUB_REF
|
||||
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||
REF=${REF#refs/heads/}
|
||||
echo REF: $REF
|
||||
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
||||
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||
cd ..
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
||||
./bootstrap.sh
|
||||
./b2 -d0 headers
|
||||
|
||||
- name: Create user-config.jam
|
||||
if: matrix.compiler
|
||||
run: |
|
||||
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd ../boost-root
|
||||
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
|
||||
|
||||
windows:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: msvc-14.1
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2016
|
||||
- toolset: msvc-14.2
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2019
|
||||
- toolset: msvc-14.3
|
||||
cxxstd: "14,17,latest"
|
||||
addrmd: 32,64
|
||||
os: windows-2022
|
||||
- toolset: gcc
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
addrmd: 64
|
||||
os: windows-2019
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
run: |
|
||||
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
||||
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
||||
echo LIBRARY: %LIBRARY%
|
||||
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
||||
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
||||
echo GITHUB_REF: %GITHUB_REF%
|
||||
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
||||
set BOOST_BRANCH=develop
|
||||
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
||||
echo BOOST_BRANCH: %BOOST_BRANCH%
|
||||
cd ..
|
||||
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
||||
git submodule update --init tools/boostdep
|
||||
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
||||
cmd /c bootstrap
|
||||
b2 -d0 headers
|
||||
|
||||
- name: Run tests
|
||||
shell: cmd
|
||||
run: |
|
||||
cd ../boost-root
|
||||
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release
|
133
.travis.yml
133
.travis.yml
@ -4,11 +4,7 @@
|
||||
|
||||
language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
dist: trusty
|
||||
|
||||
python: "2.7"
|
||||
dist: xenial
|
||||
|
||||
branches:
|
||||
only:
|
||||
@ -26,10 +22,6 @@ matrix:
|
||||
- env: BOGUS_JOB=true
|
||||
|
||||
include:
|
||||
- os: linux
|
||||
compiler: g++
|
||||
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.4
|
||||
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
|
||||
@ -131,20 +123,18 @@ matrix:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-8
|
||||
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||
dist: bionic
|
||||
compiler: g++-10
|
||||
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-10 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-8
|
||||
- g++-10
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
@ -153,6 +143,7 @@ matrix:
|
||||
- clang-3.3
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
@ -161,13 +152,13 @@ matrix:
|
||||
- clang-3.4
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang++-3.5
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.5
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
@ -178,7 +169,16 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.7
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
@ -189,7 +189,6 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.8
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
@ -200,7 +199,6 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.9
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
@ -211,24 +209,22 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- clang-4.0
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-4.0
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang++-5.0
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang++-6.0
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
@ -237,9 +233,9 @@ matrix:
|
||||
- clang-6.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-6.0
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang++-7
|
||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
@ -248,9 +244,10 @@ matrix:
|
||||
- clang-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
- llvm-toolchain-bionic-7
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang++-8
|
||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
@ -259,10 +256,10 @@ matrix:
|
||||
- clang-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-8
|
||||
- llvm-toolchain-bionic-8
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
compiler: clang++-9
|
||||
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
@ -271,29 +268,50 @@ matrix:
|
||||
- clang-9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
|
||||
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-6.0
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17 UBSAN_OPTIONS=print_stacktrace=1
|
||||
dist: bionic
|
||||
compiler: clang++-10
|
||||
env: TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-6.0
|
||||
- clang-10
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-6.0
|
||||
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-libc++
|
||||
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
||||
dist: bionic
|
||||
compiler: clang++-11
|
||||
env: TOOLSET=clang COMPILER=clang++-11 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libc++-dev
|
||||
- clang-11
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang++-12
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-12 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-12
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang++-libc++
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||
addons:
|
||||
@ -301,9 +319,50 @@ matrix:
|
||||
packages:
|
||||
- libc++-dev
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang++-libc++
|
||||
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libc++-dev
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z UBSAN_OPTIONS=print_stacktrace=1
|
||||
|
||||
- os: linux
|
||||
env: CMAKE=1
|
||||
script:
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBUILD_TESTING=ON -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=throw_exception ..
|
||||
- ctest --output-on-failure -R boost_throw_exception
|
||||
|
||||
- os: linux
|
||||
env: CMAKE_SUBDIR=1
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- git clone -b $BOOST_BRANCH https://github.com/boostorg/assert.git ../assert
|
||||
- git clone -b $BOOST_BRANCH https://github.com/boostorg/config.git ../config
|
||||
- git clone -b $BOOST_BRANCH https://github.com/boostorg/core.git ../core
|
||||
script:
|
||||
- cd test/cmake_subdir_test && mkdir __build__ && cd __build__
|
||||
- cmake ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target check
|
||||
|
||||
- os: linux
|
||||
env: CMAKE_INSTALL=1
|
||||
script:
|
||||
- pip install --user cmake
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=throw_exception -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
- cmake --build . --target install
|
||||
- cd ../libs/throw_exception/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target check
|
||||
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
|
@ -1,12 +1,9 @@
|
||||
# Copyright 2018 Mike Dev
|
||||
# Copyright 2019 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
# Partial (add_subdirectory only) and experimental CMake support
|
||||
# Subject to change; please do not rely on the contents of this file yet
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(BoostThrowException LANGUAGES CXX)
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
project(boost_throw_exception VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_throw_exception INTERFACE)
|
||||
add_library(Boost::throw_exception ALIAS boost_throw_exception)
|
||||
@ -14,7 +11,13 @@ add_library(Boost::throw_exception ALIAS boost_throw_exception)
|
||||
target_include_directories(boost_throw_exception INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_throw_exception
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
INTERFACE
|
||||
Boost::assert
|
||||
Boost::config
|
||||
)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
||||
|
10
appveyor.yml
10
appveyor.yml
@ -15,17 +15,23 @@ branches:
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0
|
||||
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0
|
||||
ADDRMD: 32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
TOOLSET: msvc-12.0,msvc-14.0
|
||||
ADDRMD: 32,64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLSET: msvc-14.1
|
||||
CXXSTD: 14,17
|
||||
ADDRMD: 32,64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLSET: clang-win
|
||||
CXXSTD: 14,17
|
||||
ADDRMD: 64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
TOOLSET: msvc-14.2
|
||||
CXXSTD: 14,17
|
||||
CXXSTD: 14,17,latest
|
||||
ADDRMD: 32,64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ADDPATH: C:\cygwin\bin;
|
||||
TOOLSET: gcc
|
||||
|
@ -5,15 +5,15 @@ http://www.boost.org/LICENSE_1_0.txt
|
||||
////
|
||||
|
||||
[#changes]
|
||||
# Release History
|
||||
# Revision History
|
||||
:toc:
|
||||
:toc-title:
|
||||
:idprefix:
|
||||
|
||||
## Changes in Boost 1.73.0
|
||||
## Changes in 1.73.0
|
||||
|
||||
* Added an overload of `throw_exception` that takes a `boost::source_location`
|
||||
object.
|
||||
|
||||
|
||||
NOTE: Projects using `BOOST_THROW_EXCEPTION` with exceptions disabled will need
|
||||
to add a definition of this new overload.
|
||||
|
@ -9,6 +9,8 @@ Peter Dimov, Emil Dotchevski
|
||||
:toc: left
|
||||
:idprefix:
|
||||
:docinfo: private-footer
|
||||
:source-highlighter: rouge
|
||||
:source-language: c++
|
||||
|
||||
:leveloffset: +1
|
||||
|
||||
|
@ -3,10 +3,11 @@
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
|
||||
#define UUID_274DA366004E11DCB1DDFE2E56D89593
|
||||
#ifndef BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593
|
||||
#define BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <exception>
|
||||
|
||||
#ifdef BOOST_EXCEPTION_MINI_BOOST
|
||||
#include <memory>
|
||||
@ -16,13 +17,18 @@ namespace boost { template <class T> class shared_ptr; }
|
||||
namespace boost { namespace exception_detail { using boost::shared_ptr; } }
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#if !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#if __GNUC__*100+__GNUC_MINOR__>301
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#ifdef __clang__
|
||||
#pragma clang system_header
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push,1)
|
||||
#pragma warning(disable: 4265)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace
|
||||
boost
|
||||
@ -385,6 +391,9 @@ boost
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
#if defined(BOOST_NO_EXCEPTIONS)
|
||||
BOOST_NORETURN void throw_exception(std::exception const & e); // user defined
|
||||
#endif
|
||||
|
||||
namespace
|
||||
exception_detail
|
||||
@ -461,7 +470,11 @@ boost
|
||||
void
|
||||
rethrow() const
|
||||
{
|
||||
#if defined(BOOST_NO_EXCEPTIONS)
|
||||
boost::throw_exception(*this);
|
||||
#else
|
||||
throw*this;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -478,4 +491,5 @@ boost
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // #ifndef BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef UUID_AA15E74A856F11E08B8D93F24824019B
|
||||
#define UUID_AA15E74A856F11E08B8D93F24824019B
|
||||
#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
||||
#define BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
@ -20,60 +20,26 @@
|
||||
// http://www.boost.org/libs/throw_exception
|
||||
//
|
||||
|
||||
#include <boost/exception/exception.hpp>
|
||||
#include <boost/assert/source_location.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <exception>
|
||||
#include <cstddef>
|
||||
|
||||
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
|
||||
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x593) )
|
||||
# define BOOST_EXCEPTION_DISABLE
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
// All boost exceptions are required to derive from std::exception,
|
||||
// to ensure compatibility with BOOST_NO_EXCEPTIONS.
|
||||
|
||||
inline void throw_exception_assert_compatibility( std::exception const & ) {}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#if defined( BOOST_NO_EXCEPTIONS )
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
BOOST_NORETURN void throw_exception( std::exception const & e ); // user defined
|
||||
BOOST_NORETURN void throw_exception( std::exception const & e, boost::source_location const & loc ); // user defined
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#elif defined( BOOST_EXCEPTION_DISABLE )
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template<class E> BOOST_NORETURN void throw_exception( E const & e )
|
||||
{
|
||||
throw_exception_assert_compatibility( e );
|
||||
throw e;
|
||||
}
|
||||
|
||||
template<class E> BOOST_NORETURN void throw_exception( E const & e, boost::source_location const & )
|
||||
{
|
||||
throw_exception_assert_compatibility( e );
|
||||
throw e;
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#else // !defined( BOOST_NO_EXCEPTIONS ) && !defined( BOOST_EXCEPTION_DISABLE )
|
||||
|
||||
#include <boost/exception/exception.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
#endif
|
||||
|
||||
// boost::wrapexcept<E>
|
||||
|
||||
@ -86,7 +52,7 @@ typedef char (&wrapexcept_s2)[ 2 ];
|
||||
template<class T> wrapexcept_s1 wrapexcept_is_convertible( T* );
|
||||
template<class T> wrapexcept_s2 wrapexcept_is_convertible( void* );
|
||||
|
||||
template<class E, class B, int I = sizeof( wrapexcept_is_convertible<B>( static_cast< E* >( 0 ) ) ) > struct wrapexcept_add_base;
|
||||
template<class E, class B, std::size_t I = sizeof( wrapexcept_is_convertible<B>( static_cast< E* >( 0 ) ) ) > struct wrapexcept_add_base;
|
||||
|
||||
template<class E, class B> struct wrapexcept_add_base<E, B, 1>
|
||||
{
|
||||
@ -140,7 +106,7 @@ public:
|
||||
set_info( *this, throw_function( loc.function_name() ) );
|
||||
}
|
||||
|
||||
virtual boost::exception_detail::clone_base const * clone() const
|
||||
virtual boost::exception_detail::clone_base const * clone() const BOOST_OVERRIDE
|
||||
{
|
||||
wrapexcept * p = new wrapexcept( *this );
|
||||
deleter del = { p };
|
||||
@ -151,14 +117,45 @@ public:
|
||||
return p;
|
||||
}
|
||||
|
||||
virtual void rethrow() const
|
||||
virtual void rethrow() const BOOST_OVERRIDE
|
||||
{
|
||||
#if defined( BOOST_NO_EXCEPTIONS )
|
||||
|
||||
boost::throw_exception( *this );
|
||||
|
||||
#else
|
||||
|
||||
throw *this;
|
||||
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
// All boost exceptions are required to derive from std::exception,
|
||||
// to ensure compatibility with BOOST_NO_EXCEPTIONS.
|
||||
|
||||
inline void throw_exception_assert_compatibility( std::exception const & ) {}
|
||||
|
||||
// boost::throw_exception
|
||||
|
||||
#if !defined( BOOST_NO_EXCEPTIONS )
|
||||
|
||||
#if defined( BOOST_EXCEPTION_DISABLE )
|
||||
|
||||
template<class E> BOOST_NORETURN void throw_exception( E const & e )
|
||||
{
|
||||
throw_exception_assert_compatibility( e );
|
||||
throw e;
|
||||
}
|
||||
|
||||
template<class E> BOOST_NORETURN void throw_exception( E const & e, boost::source_location const & )
|
||||
{
|
||||
throw_exception_assert_compatibility( e );
|
||||
throw e;
|
||||
}
|
||||
|
||||
#else // defined( BOOST_EXCEPTION_DISABLE )
|
||||
|
||||
template<class E> BOOST_NORETURN void throw_exception( E const & e )
|
||||
{
|
||||
throw_exception_assert_compatibility( e );
|
||||
@ -171,12 +168,14 @@ template<class E> BOOST_NORETURN void throw_exception( E const & e, boost::sourc
|
||||
throw wrapexcept<E>( e, loc );
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
#endif // defined( BOOST_EXCEPTION_DISABLE )
|
||||
|
||||
#endif
|
||||
#endif // !defined( BOOST_NO_EXCEPTIONS )
|
||||
|
||||
} // namespace boost
|
||||
|
||||
// BOOST_THROW_EXCEPTION
|
||||
|
||||
#define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x, BOOST_CURRENT_LOCATION)
|
||||
|
||||
#endif // #ifndef UUID_AA15E74A856F11E08B8D93F24824019B
|
||||
#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
|
||||
|
@ -7,10 +7,12 @@
|
||||
],
|
||||
"maintainers": [
|
||||
"Emil Dotchevski <emil -at- revergestudios.com>",
|
||||
"Peter Dimov <pdimov -at- pdimov.com>"
|
||||
"Peter Dimov <pdimov -at- gmail.com>"
|
||||
],
|
||||
"description": "A common infrastructure for throwing exceptions from Boost libraries.",
|
||||
"category": [
|
||||
"Miscellaneous"
|
||||
]
|
||||
"Emulation",
|
||||
"Error-handling"
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
17
test/CMakeLists.txt
Normal file
17
test/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2018, 2019 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST)
|
||||
|
||||
if(HAVE_BOOST_TEST)
|
||||
|
||||
boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::throw_exception Boost::core Boost::exception)
|
||||
|
||||
endif()
|
||||
|
||||
#run throw_from_library_test.cpp lib1_throw lib2_throw lib3_throw : : : <link>static : throw_from_library_static ;
|
||||
#run throw_from_library_test.cpp lib1_throw lib2_throw lib3_throw : : : <link>shared : throw_from_library_shared ;
|
||||
|
||||
#run throw_exception_nx_test.cpp : : : <exception-handling>off ;
|
||||
#run throw_exception_nx_test2.cpp : : : <exception-handling>off ;
|
@ -1,18 +1,27 @@
|
||||
# Boost Exception Library test Jamfile
|
||||
# Boost ThrowException Library test Jamfile
|
||||
#
|
||||
# Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||
# Copyright 2019 Peter Dimov
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import testing ;
|
||||
|
||||
project : requirements
|
||||
<warnings>extra
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
<toolset>gcc:<cxxflags>-Wshadow ;
|
||||
|
||||
run throw_exception_test.cpp ;
|
||||
run throw_exception_no_exceptions_test.cpp ;
|
||||
run throw_exception_no_integration_test.cpp ;
|
||||
run throw_exception_no_both_test.cpp ;
|
||||
|
||||
compile-fail throw_exception_fail.cpp ;
|
||||
compile-fail throw_exception_fail.cpp
|
||||
: <warnings-as-errors>off ;
|
||||
|
||||
run throw_exception_test2.cpp ;
|
||||
run throw_exception_test3.cpp ;
|
||||
@ -28,3 +37,10 @@ run throw_from_library_test.cpp lib1_throw lib2_throw lib3_throw : : : <link>sha
|
||||
|
||||
run throw_exception_nx_test.cpp : : : <exception-handling>off ;
|
||||
run throw_exception_nx_test2.cpp : : : <exception-handling>off ;
|
||||
run throw_exception_nx_test3.cpp : : : <exception-handling>off ;
|
||||
|
||||
run make_exception_ptr_test.cpp ;
|
||||
run make_exception_ptr_test2.cpp ;
|
||||
|
||||
run make_exception_ptr_nx_test.cpp : : : <exception-handling>off ;
|
||||
run make_exception_ptr_nx_test2.cpp : : : <exception-handling>off ;
|
||||
|
17
test/cmake_install_test/CMakeLists.txt
Normal file
17
test/cmake_install_test/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2018 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(cmake_install_test LANGUAGES CXX)
|
||||
|
||||
find_package(boost_throw_exception REQUIRED)
|
||||
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Boost::throw_exception)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME main COMMAND main)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
19
test/cmake_install_test/main.cpp
Normal file
19
test/cmake_install_test/main.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2019 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <stdexcept>
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::throw_exception( std::runtime_error( "" ) );
|
||||
return 1;
|
||||
}
|
||||
catch( std::runtime_error const& )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
19
test/cmake_subdir_test/CMakeLists.txt
Normal file
19
test/cmake_subdir_test/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright 2018 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(cmake_subdir_test LANGUAGES CXX)
|
||||
|
||||
add_subdirectory(../../../assert boostorg/assert)
|
||||
add_subdirectory(../../../config boostorg/config)
|
||||
add_subdirectory(../../../throw_exception boostorg/throw_exception)
|
||||
|
||||
add_executable(main main.cpp)
|
||||
target_link_libraries(main Boost::throw_exception)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME main COMMAND main)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
19
test/cmake_subdir_test/main.cpp
Normal file
19
test/cmake_subdir_test/main.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2019 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <stdexcept>
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::throw_exception( std::runtime_error( "" ) );
|
||||
return 1;
|
||||
}
|
||||
catch( std::runtime_error const& )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
29
test/make_exception_ptr_nx_test.cpp
Normal file
29
test/make_exception_ptr_nx_test.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#include <boost/exception_ptr.hpp>
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::make_exception_ptr( my_exception() );
|
||||
}
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
// shared_ptr needs this
|
||||
void throw_exception( std::exception const & )
|
||||
{
|
||||
std::exit( 1 );
|
||||
}
|
||||
|
||||
} // namespace boost
|
31
test/make_exception_ptr_nx_test2.cpp
Normal file
31
test/make_exception_ptr_nx_test2.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#define BOOST_EXCEPTION_DISABLE
|
||||
|
||||
#include <boost/exception_ptr.hpp>
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::make_exception_ptr( my_exception() );
|
||||
}
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
// shared_ptr needs this
|
||||
void throw_exception( std::exception const & )
|
||||
{
|
||||
std::exit( 1 );
|
||||
}
|
||||
|
||||
} // namespace boost
|
18
test/make_exception_ptr_test.cpp
Normal file
18
test/make_exception_ptr_test.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
#include <boost/exception_ptr.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_THROWS( boost::rethrow_exception( boost::make_exception_ptr( my_exception() ) ), my_exception );
|
||||
return boost::report_errors();
|
||||
}
|
20
test/make_exception_ptr_test2.cpp
Normal file
20
test/make_exception_ptr_test2.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
#define BOOST_EXCEPTION_DISABLE
|
||||
|
||||
#include <boost/exception_ptr.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_THROWS( boost::rethrow_exception( boost::make_exception_ptr( my_exception() ) ), my_exception );
|
||||
return boost::report_errors();
|
||||
}
|
@ -9,6 +9,10 @@
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
|
@ -8,6 +8,10 @@
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
class my_exception: public std::exception {};
|
||||
|
||||
int main()
|
||||
|
@ -5,7 +5,11 @@
|
||||
|
||||
#define BOOST_EXCEPTION_DISABLE
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
class my_exception: public std::exception { };
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@ -22,7 +28,7 @@ void throw_exception( std::exception const &, boost::source_location const & loc
|
||||
int r = 0;
|
||||
|
||||
if( std::strcmp( loc.file_name(), __FILE__ ) != 0 ) ++r;
|
||||
if( loc.line() != 13 ) ++r;
|
||||
if( loc.line() != 19 ) ++r;
|
||||
|
||||
std::exit( r );
|
||||
}
|
||||
|
18
test/throw_exception_nx_test3.cpp
Normal file
18
test/throw_exception_nx_test3.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
# pragma warning(disable: 4577) // noexcept used without /EHsc
|
||||
# pragma warning(disable: 4530) // C++ exception handler used
|
||||
#endif
|
||||
|
||||
// Make sure that simple inclusion does not
|
||||
// require boost::throw_exception to be defined
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
@ -4,10 +4,13 @@
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
class my_exception: public std::exception { };
|
||||
|
||||
int
|
||||
|
@ -6,7 +6,11 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
class my_exception: public std::exception
|
||||
{
|
||||
|
@ -5,9 +5,21 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
# pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
# pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
# pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
|
||||
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/exception_ptr.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
class my_exception: public std::exception
|
||||
{
|
||||
|
@ -5,6 +5,13 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
# pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
# pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
# pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
|
||||
#endif
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/exception/get_error_info.hpp>
|
||||
#include <boost/exception/info.hpp>
|
||||
|
@ -5,6 +5,18 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4702) // unreachable code
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
# pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
# pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
|
||||
# pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
|
||||
# pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include "lib1_throw.hpp"
|
||||
#include "lib2_throw.hpp"
|
||||
#include "lib3_throw.hpp"
|
||||
|
Reference in New Issue
Block a user