Compare commits

...

15 Commits

Author SHA1 Message Date
0fefe9831a Use Azure mirrors of Ubuntu .deb repositories in containers.
This reduces the likelihood of spurious CI failures caused by DDoS filters
being triggered by massive numbers of concurrent CI jobs.
2025-06-13 03:41:04 +03:00
c4c7cafd41 Added new gcc and clang jobs to GitHub Actions. 2025-06-13 03:40:33 +03:00
b66e9a0aa8 Removed windows-2019 GitHub Actions jobs.
The windows-2019 image is deprecated and is about to be removed.
2025-06-13 03:38:43 +03:00
5fd694fce2 Removed obsolete GHA images and C++03 jobs, added new compilers. 2025-04-19 18:33:56 +03:00
2dfe66886d Add a comma before ellipsis in constexpr_swap.
gcc 15 complains that the comma is required before vararg ellipsis.

Fixes https://github.com/boostorg/integer/issues/35.
2024-12-02 19:22:20 +03:00
b774aa0d9e Remove constexpr_min duplication. 2024-12-02 18:58:34 +03:00
fbaf2dee58 Added a missing dependency on Boost.TypeTraits to CMakeLists.txt. 2024-08-19 01:01:57 +03:00
318a38efde Add support for modular build structure. (#34)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.
2024-08-19 01:00:30 +03:00
f1d7f7f80f Removed legacy MinGW from AppVeyor CI.
Looks like gcc 5 that is installed in MinGW on AppVeyor CI is not compiled
with C99 standard library enabled, which results in C++11 std::to_string
functions not being available. These functions are required by
Boost.Multiprecision.

Since legacy MinGW is quite outdated and increasingly poorly supported
across Boost libraries, remove it from CI rather than adding yet another
special case for disabling Boost.Multiprecision tests.
2024-08-15 21:25:21 +03:00
b1b7f7c63d Raised compiler requirements for Boost.Multiprecision tests.
This is needed to avoid compilation errors caused by Boost.Math, as
it requires a C++14 compiler now.
2024-08-15 20:00:21 +03:00
c37a3402be Replaced macos-11 GHA image with 12, 13 and 14 since 11 is being removed. 2024-05-21 01:15:50 +03:00
dea8e3445d Added clang-17 CI jobs. 2024-02-06 00:14:04 +03:00
bf1db7ad75 Added Windows jobs to GHA CI. 2024-02-06 00:09:14 +03:00
26c347560c Reduced CI job timeouts. 2024-02-05 23:56:53 +03:00
23974e3087 Replaced actions/checkout usage with manual download commands.
This fixes the deprecation warnings for actions/checkout@v3. actions/checkout@v4
is not functional because of the upstream bug:

https://github.com/actions/checkout/issues/1590
2024-02-05 23:56:30 +03:00
7 changed files with 240 additions and 99 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2021-2023 Andrey Semashev
# Copyright 2021-2025 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)
@ -85,32 +85,50 @@ jobs:
- g++-8
- toolset: gcc-9
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- g++-9
- toolset: gcc-10
cxxstd: "11,14,17,20"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- g++-10
- toolset: gcc-11
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
os: ubuntu-22.04
install:
- g++-11
- toolset: gcc-12
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
os: ubuntu-22.04
install:
- g++-12
- toolset: gcc-13
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
os: ubuntu-24.04
install:
- g++-13
- toolset: gcc-14
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
os: ubuntu-24.04
install:
- g++-14
- toolset: gcc-15
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
os: ubuntu-latest
container: ubuntu:25.04
install:
- g++-15
- name: UBSAN
toolset: gcc-11
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
toolset: gcc-13
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
ubsan: 1
build_variant: debug
os: ubuntu-22.04
os: ubuntu-24.04
install:
- g++-11
- g++-13
# Linux, clang
- toolset: clang
@ -189,13 +207,15 @@ jobs:
- toolset: clang
compiler: clang++-9
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- clang-9
- toolset: clang
compiler: clang++-10
cxxstd: "11,14,17,20"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install:
- clang-10
- toolset: clang
@ -206,7 +226,7 @@ jobs:
- clang-11
- toolset: clang
compiler: clang++-12
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
install:
- clang-12
@ -214,7 +234,7 @@ jobs:
gcc_toolchain: 11
- toolset: clang
compiler: clang++-13
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
install:
- clang-13
@ -222,7 +242,7 @@ jobs:
gcc_toolchain: 11
- toolset: clang
compiler: clang++-14
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
install:
- clang-14
@ -230,65 +250,81 @@ jobs:
gcc_toolchain: 11
- toolset: clang
compiler: clang++-15
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
install:
- clang-15
- g++-11
gcc_toolchain: 11
- toolset: clang
compiler: clang++-15
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
install:
- clang-15
- libc++-15-dev
- libc++abi-15-dev
cxxflags: -stdlib=libc++
linkflags: -stdlib=libc++
- toolset: clang
compiler: clang++-16
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-24.04
install:
- clang-16
sources:
- "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
source_keys:
- "https://apt.llvm.org/llvm-snapshot.gpg.key"
- g++-11
gcc_toolchain: 11
- toolset: clang
compiler: clang++-16
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
os: ubuntu-22.04
compiler: clang++-17
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
os: ubuntu-24.04
install:
- clang-16
- libc++-16-dev
- libc++abi-16-dev
sources:
- "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
source_keys:
- "https://apt.llvm.org/llvm-snapshot.gpg.key"
- clang-17
- g++-11
gcc_toolchain: 11
- toolset: clang
compiler: clang++-18
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
os: ubuntu-24.04
install:
- clang-18
- g++-13
- toolset: clang
compiler: clang++-19
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
os: ubuntu-24.04
install:
- clang-19
- toolset: clang
compiler: clang++-20
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
os: ubuntu-latest
container: ubuntu:25.04
install:
- clang-20
- toolset: clang
compiler: clang++-20
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
cxxflags: -stdlib=libc++
linkflags: -stdlib=libc++
os: ubuntu-latest
container: ubuntu:25.04
install:
- clang-20
- libc++-20-dev
- libc++abi-20-dev
- name: UBSAN
toolset: clang
compiler: clang++-15
cxxstd: "03-gnu,11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
compiler: clang++-18
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu,26-gnu"
cxxflags: -stdlib=libc++
linkflags: -stdlib=libc++
ubsan: 1
build_variant: debug
os: ubuntu-22.04
os: ubuntu-24.04
install:
- clang-15
- libc++-15-dev
- libc++abi-15-dev
- clang-18
- libc++-18-dev
- libc++abi-18-dev
- toolset: clang
cxxstd: "11,14,17,2a"
os: macos-11
cxxstd: "11,14,17,20,2b"
os: macos-13
- toolset: clang
cxxstd: "11,14,17,20,2b"
os: macos-14
timeout-minutes: 60
timeout-minutes: 15
runs-on: ${{matrix.os}}
container: ${{matrix.container}}
@ -305,6 +341,22 @@ jobs:
echo "GHA_CONTAINER=${{matrix.container}}" >> $GITHUB_ENV
if [ -f "/etc/debian_version" ]
then
# Use Azure APT mirrors in containers to avoid HTTP errors due to DDoS filters triggered by lots of CI jobs launching concurrently.
# Note that not all Ubuntu versions support "mirror+file:..." URIs in APT sources, so just use Azure mirrors exclusively.
# Note also that on recent Ubuntu versions DEB822 format is used for source files.
APT_SOURCES=()
if [ -d "/etc/apt/sources.list.d" ]
then
readarray -t APT_SOURCES < <(find "/etc/apt/sources.list.d" -type f -name '*.sources' -print)
fi
if [ -f "/etc/apt/sources.list" ]
then
APT_SOURCES+=("/etc/apt/sources.list")
fi
if [ "${#APT_SOURCES[@]}" -gt 0 ]
then
sed -i -E -e 's!([^ ]+) (http|https)://(archive|security)\.ubuntu\.com/ubuntu[^ ]*(.*)!\1 http://azure.archive.ubuntu.com/ubuntu/\4!' "${APT_SOURCES[@]}"
fi
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
if [ "$(apt-cache search "^python-is-python3$" | wc -l)" -ne 0 ]
then
@ -317,8 +369,6 @@ jobs:
fi
git config --global pack.threads 0
- uses: actions/checkout@v3
- name: Install packages
if: matrix.install
run: |
@ -433,11 +483,25 @@ jobs:
then
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
fi
mkdir -p snapshot
cd snapshot
echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz"
if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ]
then
echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:"
ls -la
exit 1
fi
rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz"
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
mkdir -p libs
rm -rf "libs/$LIBRARY"
mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY"
rm -rf "../snapshot"
git submodule update --init tools/boostdep
DEPINST_ARGS+=("$LIBRARY")
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
@ -459,7 +523,7 @@ jobs:
- name: Run tests
if: matrix.cmake_tests == ''
run: |
cd ../boost-root
cd boost-root
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
if [ -n "${{matrix.build_variant}}" ]
then
@ -486,3 +550,70 @@ jobs:
fi
B2_ARGS+=("libs/$LIBRARY/test")
./b2 "${B2_ARGS[@]}"
windows:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.3
cxxstd: "14,17,20,latest"
addrmd: 32,64
os: windows-2022
- toolset: clang-win
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2022
- toolset: gcc
cxxstd: "11,14,17,20,23"
addrmd: 64
os: windows-2022
timeout-minutes: 15
runs-on: ${{matrix.os}}
steps:
- 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%
mkdir snapshot
cd snapshot
echo Downloading library snapshot: https://github.com/%GITHUB_REPOSITORY%/archive/%GITHUB_SHA%.zip
curl -L --retry %NET_RETRY_COUNT% -o "%LIBRARY%-%GITHUB_SHA%.zip" "https://github.com/%GITHUB_REPOSITORY%/archive/%GITHUB_SHA%.zip"
tar -xf "%LIBRARY%-%GITHUB_SHA%.zip"
if not exist "%LIBRARY%-%GITHUB_SHA%\" (
echo Library snapshot does not contain the library directory %LIBRARY%-%GITHUB_SHA%:
dir
exit /b 1
)
del /f "%LIBRARY%-%GITHUB_SHA%.zip"
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
if not exist "libs\" mkdir libs
if exist "libs\%LIBRARY%\" rmdir /s /q "libs\%LIBRARY%"
move /Y "..\snapshot\%LIBRARY%-%GITHUB_SHA%" "libs\%LIBRARY%"
rmdir /s /q "..\snapshot"
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
- name: Run tests
shell: cmd
run: |
cd boost-root
if not "${{matrix.cxxstd}}" == "" set CXXSTD=cxxstd=${{matrix.cxxstd}}
if not "${{matrix.addrmd}}" == "" set ADDRMD=address-model=${{matrix.addrmd}}
if not "${{matrix.build_variant}}" == "" (set BUILD_VARIANT=variant=${{matrix.build_variant}}) else (set BUILD_VARIANT=variant=%DEFAULT_BUILD_VARIANT%)
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} %CXXSTD% %ADDRMD% %BUILD_VARIANT% embed-manifest-via=linker

View File

@ -19,4 +19,5 @@ target_link_libraries(boost_integer
Boost::core
Boost::static_assert
Boost::throw_exception
Boost::type_traits
)

View File

@ -42,10 +42,6 @@ environment:
CXXSTD: 11,14,1z
ADDPATH: C:\cygwin64\bin;
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- TOOLSET: gcc
CXXSTD: 11,14,1z
ADDPATH: C:\mingw\bin;
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- TOOLSET: gcc
CXXSTD: 11,14,1z
ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;

28
build.jam Normal file
View File

@ -0,0 +1,28 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
require-b2 5.2 ;
constant boost_dependencies :
/boost/assert//boost_assert
/boost/config//boost_config
/boost/core//boost_core
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/type_traits//boost_type_traits ;
project /boost/integer
: common-requirements
<include>include
;
explicit
[ alias boost_integer : : : : <library>$(boost_dependencies) ]
[ alias all : boost_integer test ]
;
call-if : boost-library integer
;

View File

@ -51,19 +51,20 @@ namespace boost {
//
// some helper functions which really should be constexpr already, but sadly aren't:
//
#ifndef BOOST_NO_CXX14_CONSTEXPR
template <class T>
inline constexpr T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
inline BOOST_CONSTEXPR T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
{
return a < b ? a : b;
}
#ifndef BOOST_NO_CXX14_CONSTEXPR
template <class T>
inline constexpr auto constexpr_swap(T&a, T& b) BOOST_GCD_NOEXCEPT(T) -> decltype(a.swap(b))
inline constexpr auto constexpr_swap(T& a, T& b) BOOST_GCD_NOEXCEPT(T) -> decltype(a.swap(b))
{
return a.swap(b);
}
template <class T, class U>
inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T)
inline constexpr void constexpr_swap(T& a, U& b, ...) BOOST_GCD_NOEXCEPT(T)
{
T t(static_cast<T&&>(a));
a = static_cast<T&&>(b);
@ -71,12 +72,7 @@ namespace boost {
}
#else
template <class T>
inline T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
{
return a < b ? a : b;
}
template <class T>
inline void constexpr_swap(T&a, T& b) BOOST_GCD_NOEXCEPT(T)
inline void constexpr_swap(T& a, T& b) BOOST_GCD_NOEXCEPT(T)
{
using std::swap;
swap(a, b);

View File

@ -2,10 +2,13 @@
#~ 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)
require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;
import testing ;
import ../../config/checks/config : requires ;
project : requirements <warnings>all <toolset>gcc:<cxxflags>-Wextra ;
project : requirements <warnings>all <toolset>gcc:<cxxflags>-Wextra
<library>/boost/integer//boost_integer ;
obj has_gmpxx : has_gmpxx.cpp ;
explicit has_gmpxx ;
@ -13,18 +16,18 @@ explicit has_gmpxx ;
test-suite integer
:
[ run integer_traits_test.cpp ]
[ run integer_test.cpp : : : <toolset>gcc:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-Wno-long-long <toolset>sun:<cxxflags>"-Qoption ccfe -tmpldepth=128" ]
[ run integer_mask_test.cpp ]
[ run integer_log2_test.cpp ]
[ run static_log2_test.cpp ]
[ run static_min_max_test.cpp ]
[ run extended_euclidean_test.cpp ]
[ run mod_inverse_test.cpp ]
[ run integer_test.cpp : : : <library>/boost/mpl//boost_mpl <toolset>gcc:<cxxflags>-Wno-long-long <toolset>darwin:<cxxflags>-Wno-long-long <toolset>sun:<cxxflags>"-Qoption ccfe -tmpldepth=128" ]
[ run integer_mask_test.cpp : : : <library>/boost/detail//boost_detail ]
[ run integer_log2_test.cpp : : : <library>/boost/multiprecision//boost_multiprecision ]
[ run static_log2_test.cpp : : : <library>/boost/detail//boost_detail ]
[ run static_min_max_test.cpp : : : <library>/boost/detail//boost_detail ]
[ run extended_euclidean_test.cpp : : : <library>/boost/multiprecision//boost_multiprecision ]
[ run mod_inverse_test.cpp : : : <library>/boost/optional//boost_optional <library>/boost/multiprecision//boost_multiprecision ]
[ compile integer_traits_include_test.cpp ]
[ compile integer_include_test.cpp ]
[ compile integer_mask_include_test.cpp ]
[ compile static_log2_include_test.cpp ]
[ compile static_min_max_include_test.cpp ]
[ compile static_min_max_include_test.cpp : <library>/boost/detail//boost_detail ]
[ compile integer_fwd_include_test.cpp ]
[ compile gcd_constexpr14_test.cpp ]
[ compile gcd_noexcept_test.cpp ]
@ -35,5 +38,5 @@ test-suite integer
[ compile-fail fail_uint_fast.cpp ]
[ compile-fail fail_uint_least.cpp ]
[ compile-fail fail_uint_65.cpp ]
[ run common_factor_test.cpp : : : [ check-target-builds has_gmpxx "Checking for gmpxx.h" : <define>BOOST_INTEGER_HAS_GMPXX_H=1 <linkflags>-lgmp <linkflags>-lgmpxx ] ]
[ run common_factor_test.cpp : : : <library>/boost/mpl//boost_mpl <library>/boost/random//boost_random <library>/boost/rational//boost_rational <library>/boost/multiprecision//boost_multiprecision [ check-target-builds has_gmpxx "Checking for gmpxx.h" : <define>BOOST_INTEGER_HAS_GMPXX_H=1 <linkflags>-lgmp <linkflags>-lgmpxx ] ]
;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Andrey Semashev
// Copyright (c) 2018, 2024 Andrey Semashev
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -8,25 +8,11 @@
#define BOOST_INTEGER_TEST_MULTIPRECISION_CONFIG_HPP_INCLUDED_
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1500)) || \
(defined(__clang_major__) && (__clang_major__ == 3) && (__clang_minor__ < 2)) || \
(defined(BOOST_GCC) && defined(BOOST_GCC_CXX11) && BOOST_GCC < 40800)
#define DISABLE_MP_TESTS
#endif
// This list of checks matches those in Boost.Multiprecision, boost/multiprecision/detail/number_base.hpp,
// as it no longer supports C++03 since 2021.
#if !defined(DISABLE_MP_TESTS) && \
(\
defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || defined(BOOST_NO_CXX11_HDR_ARRAY) || defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)\
|| defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || defined(BOOST_NO_CXX11_CONSTEXPR)\
|| (defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140)) || defined(BOOST_NO_CXX11_REF_QUALIFIERS) || defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)\
|| defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_USER_DEFINED_LITERALS) || defined(BOOST_NO_CXX11_THREAD_LOCAL)\
|| defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_STATIC_ASSERT) || defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)\
|| defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_REF_QUALIFIERS)\
)
// Boost.Multiprecision requires a number of C++11 features, see boost/multiprecision/detail/check_cpp11_config.hpp.
// Also, Boost.Multiprecision internally uses Boost.Math, which requires C++14 and a recent enough MSVC, see boost/math/tools/config.hpp.
#if (BOOST_CXX_VERSION < 201402) || \
(defined(_MSC_VER) && (_MSC_VER <= 1900))
#define DISABLE_MP_TESTS
#endif