mirror of
https://github.com/boostorg/integer.git
synced 2025-06-25 20:11:41 +02:00
Compare commits
64 Commits
boost-1.73
...
develop
Author | SHA1 | Date | |
---|---|---|---|
0fefe9831a | |||
c4c7cafd41 | |||
b66e9a0aa8 | |||
5fd694fce2 | |||
2dfe66886d | |||
b774aa0d9e | |||
fbaf2dee58 | |||
318a38efde | |||
f1d7f7f80f | |||
b1b7f7c63d | |||
c37a3402be | |||
dea8e3445d | |||
bf1db7ad75 | |||
26c347560c | |||
23974e3087 | |||
e7ed9918c1 | |||
becbd39cc4 | |||
28ba36fd3a | |||
8ce66ab37e | |||
d4157bdf38 | |||
721fe9f562 | |||
88457d2de5 | |||
d22bf3ea37 | |||
c659255289 | |||
49195acf60 | |||
bc9b0e6177 | |||
c6564a2d2b | |||
16ef530fcf | |||
c5df07cb21 | |||
a832e8fe65 | |||
0cd1879903 | |||
4c1e36b023 | |||
cf25880755 | |||
5b23a363ae | |||
4669ec7e78 | |||
ee1325ee11 | |||
c3ba27a249 | |||
2a78052e85 | |||
a92f2eb98f | |||
c972712386 | |||
fa6b7c465e | |||
8fd622545f | |||
be13dbce6d | |||
2ca7c7b6e3 | |||
ba7ea7f846 | |||
092d94c833 | |||
100f5e51bd | |||
0322c761b8 | |||
831869a51f | |||
45df7932c1 | |||
3723b0694a | |||
e683a37a4d | |||
a9de4c0076 | |||
54dcfa677d | |||
560df48888 | |||
6bb937fa5f | |||
a6a6b1f064 | |||
9e6b3d375a | |||
5e2a2722f1 | |||
5ae18d139e | |||
58da9b5aa8 | |||
6cb625550f | |||
c7a22c9bac | |||
52c02d1237 |
49
.drone.star
Normal file
49
.drone.star
Normal file
@ -0,0 +1,49 @@
|
||||
# Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE.txt)
|
||||
#
|
||||
# Copyright Rene Rivera 2020.
|
||||
|
||||
# For Drone CI we use the Starlark scripting language to reduce duplication.
|
||||
# As the yaml syntax for Drone CI is rather limited.
|
||||
#
|
||||
#
|
||||
globalenv={}
|
||||
linuxglobalimage="cppalliance/droneubuntu1404:1"
|
||||
windowsglobalimage="cppalliance/dronevs2019"
|
||||
|
||||
def main(ctx):
|
||||
return [
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x Job 0", "g++", packages="g++-4.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '98,0x', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x Job 1", "g++", packages="g++-4.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '03,0x', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 2", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 3", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 4", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 5", "g++-5", packages="g++-5", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 6", "g++-6", packages="g++-6", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 7", "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 Job 8", "g++-8", packages="g++-8", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17 Job 9", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=gcc COMPILER=g++-10 CXXSTD=03,11,14,1 Job 10", "g++-10", packages="g++-10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '03,11,14,17,20', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
|
||||
linux_cxx("UBSAN=1 TOOLSET=gcc COMPILER=g++-10 CXXSTD=03 Job 11", "g++-10", packages="g++-10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'UBSAN': '1', 'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '03,11,14,17,20', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'LINKFLAGS': '-fuse-ld=gold', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.4 CXXSTD=03, Job 12", "clang++", packages="clang-3.4 libstdc++-4.9-dev", llvm_os="trusty", llvm_ver="3.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.4', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 13", "clang++", packages="clang-3.5 libstdc++-4.9-dev", llvm_os="trusty", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 14", "clang++", packages="clang-3.6 libstdc++-5-dev", llvm_os="trusty", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 15", "clang++", packages="clang-3.7 libstdc++-5-dev", llvm_os="trusty", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 16", "clang++-3.8", packages="clang-3.8 libstdc++-6-dev", llvm_os="xenial", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 17", "clang++-3.9", packages="clang-3.9 libstdc++-6-dev", llvm_os="xenial", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '0716d9708d'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 18", "clang++-4.0", packages="clang-4.0 libstdc++-6-dev", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '9e6a55b6b4'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 19", "clang++-5.0", packages="clang-5.0 libstdc++-7-dev", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03, Job 20", "clang++-6.0", packages="clang-6.0 libstdc++-8-dev", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11 Job 21", "clang++-7", packages="clang-7 libstdc++-8-dev", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '472b07b9fc'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11 Job 22", "clang++-8", packages="clang-8 libstdc++-8-dev", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '12c6fc06c9'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11 Job 23", "clang++-9", packages="clang-9 libstdc++-9-dev", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': 'd435a6cdd7'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,1 Job 24", "clang++-10", packages="clang-10 libstdc++-9-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20', 'DRONE_JOB_UUID': '4d134bc072'}, globalenv=globalenv),
|
||||
linux_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++-10 CXX Job 25", "clang++-10", packages="clang-10 libstdc++-9-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': 'f6e1126ced'}, globalenv=globalenv),
|
||||
linux_cxx("TOOLSET=clang COMPILER=clang++-10 CXXSTD=03,1 Job 26", "clang++-10", packages="clang-10 libc++-10-dev libc++abi-10-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'CXXFLAGS': '-stdlib=libc++', 'LINKFLAGS': '-stdlib=libc++', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20', 'DRONE_JOB_UUID': '887309d048'}, globalenv=globalenv),
|
||||
linux_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++-10 CXX Job 27", "clang++-10", packages="clang-10 libc++-10-dev libc++abi-10-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'CXXFLAGS': '-stdlib=libc++', 'LINKFLAGS': '-stdlib=libc++', 'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': 'bc33ea4e26'}, globalenv=globalenv),
|
||||
osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 28", "clang++", packages="", buildtype="boost", xcode_version="11.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,17', 'DRONE_JOB_UUID': '0a57cb53ba'}, globalenv=globalenv),
|
||||
]
|
||||
|
||||
# from https://github.com/boostorg/boost-ci
|
||||
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
|
3
.drone/after-success.sh
Executable file
3
.drone/after-success.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
3
.drone/before-install.sh
Executable file
3
.drone/before-install.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
3
.drone/before-script.sh
Executable file
3
.drone/before-script.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
47
.drone/boost.sh
Executable file
47
.drone/boost.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
export TRAVIS_BUILD_DIR=$(pwd)
|
||||
export DRONE_BUILD_DIR=$(pwd)
|
||||
export TRAVIS_BRANCH=$DRONE_BRANCH
|
||||
export VCS_COMMIT_ID=$DRONE_COMMIT
|
||||
export GIT_COMMIT=$DRONE_COMMIT
|
||||
export REPO_NAME=$DRONE_REPO
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
echo '==================================> BEFORE_INSTALL'
|
||||
|
||||
. .drone/before-install.sh
|
||||
|
||||
echo '==================================> INSTALL'
|
||||
|
||||
GIT_FETCH_JOBS=8
|
||||
BOOST_BRANCH=develop
|
||||
if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi
|
||||
cd ..
|
||||
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
cd boost-root
|
||||
git submodule init tools/boostdep
|
||||
git submodule init tools/build
|
||||
git submodule init tools/boost_install
|
||||
git submodule init libs/headers
|
||||
git submodule init libs/config
|
||||
git submodule update --jobs $GIT_FETCH_JOBS
|
||||
cp -r $TRAVIS_BUILD_DIR/* libs/integer
|
||||
python tools/boostdep/depinst/depinst.py --git_args "--jobs $GIT_FETCH_JOBS" integer
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
|
||||
echo '==================================> BEFORE_SCRIPT'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/before-script.sh
|
||||
|
||||
echo '==================================> SCRIPT'
|
||||
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null`
|
||||
./b2 -j $BUILD_JOBS libs/integer/test toolset=$TOOLSET cxxstd=$CXXSTD ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on visibility=global} ${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LINKFLAGS:+linkflags="$LINKFLAGS"}
|
||||
|
||||
echo '==================================> AFTER_SUCCESS'
|
||||
|
||||
. $DRONE_BUILD_DIR/.drone/after-success.sh
|
619
.github/workflows/ci.yml
vendored
Normal file
619
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,619 @@
|
||||
# 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)
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
- feature/**
|
||||
|
||||
concurrency:
|
||||
group: ${{format('{0}:{1}', github.repository, github.ref)}}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GIT_FETCH_JOBS: 8
|
||||
NET_RETRY_COUNT: 5
|
||||
DEFAULT_BUILD_VARIANT: debug,release
|
||||
|
||||
jobs:
|
||||
posix:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux, gcc
|
||||
- toolset: gcc-4.6
|
||||
cxxstd: "0x"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- "ppa:ubuntu-toolchain-r/test"
|
||||
- toolset: gcc-4.7
|
||||
cxxstd: "11"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.7
|
||||
- toolset: gcc-4.8
|
||||
cxxstd: "11"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- g++-4.8
|
||||
- toolset: gcc-4.9
|
||||
cxxstd: "11"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-4.9
|
||||
- toolset: gcc-5
|
||||
cxxstd: "11,14,1z"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- g++-5
|
||||
- toolset: gcc-6
|
||||
cxxstd: "11,14,1z"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- g++-6
|
||||
- toolset: gcc-7
|
||||
cxxstd: "11,14,17"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- g++-7
|
||||
- toolset: gcc-8
|
||||
cxxstd: "11,14,17,2a"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- g++-8
|
||||
- toolset: gcc-9
|
||||
cxxstd: "11,14,17,2a"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:20.04
|
||||
install:
|
||||
- g++-9
|
||||
- toolset: gcc-10
|
||||
cxxstd: "11,14,17,20"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:20.04
|
||||
install:
|
||||
- g++-10
|
||||
- toolset: gcc-11
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
|
||||
os: ubuntu-22.04
|
||||
install:
|
||||
- g++-11
|
||||
- toolset: gcc-12
|
||||
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-13
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
|
||||
ubsan: 1
|
||||
build_variant: debug
|
||||
os: ubuntu-24.04
|
||||
install:
|
||||
- g++-13
|
||||
|
||||
# Linux, clang
|
||||
- toolset: clang
|
||||
compiler: clang++-3.5
|
||||
cxxstd: "11"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.5
|
||||
- toolset: clang
|
||||
compiler: clang++-3.6
|
||||
cxxstd: "11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.6
|
||||
- toolset: clang
|
||||
compiler: clang++-3.7
|
||||
cxxstd: "11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.7
|
||||
- toolset: clang
|
||||
compiler: clang++-3.8
|
||||
cxxstd: "11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:16.04
|
||||
install:
|
||||
- clang-3.8
|
||||
- toolset: clang
|
||||
compiler: clang++-3.9
|
||||
cxxstd: "11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- clang-3.9
|
||||
- toolset: clang
|
||||
compiler: clang++-4.0
|
||||
cxxstd: "11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- clang-4.0
|
||||
- toolset: clang
|
||||
compiler: clang++-5.0
|
||||
cxxstd: "11,14,1z"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- clang-5.0
|
||||
- toolset: clang
|
||||
compiler: clang++-6.0
|
||||
cxxstd: "11,14,17"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- clang-6.0
|
||||
- toolset: clang
|
||||
compiler: clang++-7
|
||||
cxxstd: "11,14,17"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- clang-7
|
||||
# Note: clang-8 does not fully support C++20, so it is not compatible with libstdc++-8 in this mode
|
||||
- toolset: clang
|
||||
compiler: clang++-8
|
||||
cxxstd: "11,14,17,2a"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
install:
|
||||
- clang-8
|
||||
- g++-7
|
||||
gcc_toolchain: 7
|
||||
- toolset: clang
|
||||
compiler: clang++-9
|
||||
cxxstd: "11,14,17,2a"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:20.04
|
||||
install:
|
||||
- clang-9
|
||||
- toolset: clang
|
||||
compiler: clang++-10
|
||||
cxxstd: "11,14,17,20"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:20.04
|
||||
install:
|
||||
- clang-10
|
||||
- toolset: clang
|
||||
compiler: clang++-11
|
||||
cxxstd: "11,14,17,20"
|
||||
os: ubuntu-22.04
|
||||
install:
|
||||
- clang-11
|
||||
- toolset: clang
|
||||
compiler: clang++-12
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
|
||||
os: ubuntu-22.04
|
||||
install:
|
||||
- clang-12
|
||||
- g++-11
|
||||
gcc_toolchain: 11
|
||||
- toolset: clang
|
||||
compiler: clang++-13
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
|
||||
os: ubuntu-22.04
|
||||
install:
|
||||
- clang-13
|
||||
- g++-11
|
||||
gcc_toolchain: 11
|
||||
- toolset: clang
|
||||
compiler: clang++-14
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
|
||||
os: ubuntu-22.04
|
||||
install:
|
||||
- clang-14
|
||||
- g++-11
|
||||
gcc_toolchain: 11
|
||||
- toolset: clang
|
||||
compiler: clang++-15
|
||||
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++-16
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,2b-gnu"
|
||||
os: ubuntu-24.04
|
||||
install:
|
||||
- clang-16
|
||||
- g++-11
|
||||
gcc_toolchain: 11
|
||||
- toolset: clang
|
||||
compiler: clang++-17
|
||||
cxxstd: "11-gnu,14-gnu,17-gnu,20-gnu,23-gnu"
|
||||
os: ubuntu-24.04
|
||||
install:
|
||||
- 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++-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-24.04
|
||||
install:
|
||||
- clang-18
|
||||
- libc++-18-dev
|
||||
- libc++abi-18-dev
|
||||
|
||||
- toolset: clang
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: macos-13
|
||||
- toolset: clang
|
||||
cxxstd: "11,14,17,20,2b"
|
||||
os: macos-14
|
||||
|
||||
timeout-minutes: 15
|
||||
runs-on: ${{matrix.os}}
|
||||
container: ${{matrix.container}}
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
run: |
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
fi
|
||||
if [ -n "${{matrix.container}}" ]
|
||||
then
|
||||
echo "GHA_CONTAINER=${{matrix.container}}" >> $GITHUB_ENV
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
# 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
|
||||
PYTHON_PACKAGE="python-is-python3"
|
||||
else
|
||||
PYTHON_PACKAGE="python"
|
||||
fi
|
||||
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common tzdata wget curl apt-transport-https ca-certificates make build-essential g++ $PYTHON_PACKAGE python3 perl git cmake
|
||||
fi
|
||||
fi
|
||||
git config --global pack.threads 0
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
run: |
|
||||
declare -a SOURCE_KEYS SOURCES
|
||||
if [ -n "${{join(matrix.source_keys, ' ')}}" ]
|
||||
then
|
||||
SOURCE_KEYS=("${{join(matrix.source_keys, '" "')}}")
|
||||
fi
|
||||
if [ -n "${{join(matrix.sources, ' ')}}" ]
|
||||
then
|
||||
SOURCES=("${{join(matrix.sources, '" "')}}")
|
||||
fi
|
||||
for key in "${SOURCE_KEYS[@]}"
|
||||
do
|
||||
for i in {1..$NET_RETRY_COUNT}
|
||||
do
|
||||
echo "Adding key: $key"
|
||||
wget -O - "$key" | sudo apt-key add - && break || sleep 2
|
||||
done
|
||||
done
|
||||
if [ ${#SOURCES[@]} -gt 0 ]
|
||||
then
|
||||
APT_ADD_REPO_COMMON_ARGS=("-y")
|
||||
APT_ADD_REPO_SUPPORTED_ARGS="$(apt-add-repository --help | perl -ne 'if (/^\s*-n/) { print "n"; } elsif (/^\s*-P/) { print "P"; } elsif (/^\s*-S/) { print "S"; } elsif (/^\s*-U/) { print "U"; }')"
|
||||
if [ -n "$APT_ADD_REPO_SUPPORTED_ARGS" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*n*}" ]
|
||||
then
|
||||
APT_ADD_REPO_COMMON_ARGS+=("-n")
|
||||
fi
|
||||
APT_ADD_REPO_HAS_SOURCE_ARGS="$([ -n "$APT_ADD_REPO_SUPPORTED_ARGS" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*P*}" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*S*}" -a -z "${APT_ADD_REPO_SUPPORTED_ARGS##*U*}" ] && echo 1 || echo 0)"
|
||||
for source in "${SOURCES[@]}"
|
||||
do
|
||||
for i in {1..$NET_RETRY_COUNT}
|
||||
do
|
||||
APT_ADD_REPO_ARGS=("${APT_ADD_REPO_COMMON_ARGS[@]}")
|
||||
if [ $APT_ADD_REPO_HAS_SOURCE_ARGS -ne 0 ]
|
||||
then
|
||||
case "$source" in
|
||||
"ppa:"*)
|
||||
APT_ADD_REPO_ARGS+=("-P")
|
||||
;;
|
||||
"deb "*)
|
||||
APT_ADD_REPO_ARGS+=("-S")
|
||||
;;
|
||||
*)
|
||||
APT_ADD_REPO_ARGS+=("-U")
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
APT_ADD_REPO_ARGS+=("$source")
|
||||
echo "apt-add-repository ${APT_ADD_REPO_ARGS[@]}"
|
||||
sudo -E apt-add-repository "${APT_ADD_REPO_ARGS[@]}" && break || sleep 2
|
||||
done
|
||||
done
|
||||
fi
|
||||
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
|
||||
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{join(matrix.install, ' ')}}
|
||||
|
||||
- name: Setup GCC Toolchain
|
||||
if: matrix.gcc_toolchain
|
||||
run: |
|
||||
GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain"
|
||||
echo "GCC_TOOLCHAIN_ROOT=\"$GCC_TOOLCHAIN_ROOT\"" >> $GITHUB_ENV
|
||||
MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
|
||||
mkdir -p "$GCC_TOOLCHAIN_ROOT"
|
||||
ln -s /usr/include "$GCC_TOOLCHAIN_ROOT/include"
|
||||
ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin"
|
||||
mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET"
|
||||
ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}"
|
||||
|
||||
- name: Setup Boost
|
||||
run: |
|
||||
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
||||
LIBRARY=${GITHUB_REPOSITORY#*/}
|
||||
echo LIBRARY: $LIBRARY
|
||||
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
||||
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
||||
echo GITHUB_REF: $GITHUB_REF
|
||||
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
||||
REF=${REF#refs/heads/}
|
||||
echo REF: $REF
|
||||
BOOST_BRANCH=develop && [ "$REF" = "master" ] && BOOST_BRANCH=master || true
|
||||
echo BOOST_BRANCH: $BOOST_BRANCH
|
||||
BUILD_JOBS=$((nproc || sysctl -n hw.ncpu) 2> /dev/null)
|
||||
echo "BUILD_JOBS=$BUILD_JOBS" >> $GITHUB_ENV
|
||||
echo "CMAKE_BUILD_PARALLEL_LEVEL=$BUILD_JOBS" >> $GITHUB_ENV
|
||||
DEPINST_ARGS=()
|
||||
GIT_VERSION="$(git --version | sed -e 's/git version //')"
|
||||
GIT_HAS_JOBS=1
|
||||
if [ -f "/etc/debian_version" ]
|
||||
then
|
||||
if $(dpkg --compare-versions "$GIT_VERSION" lt 2.8.0)
|
||||
then
|
||||
GIT_HAS_JOBS=0
|
||||
fi
|
||||
else
|
||||
declare -a GIT_VER=(${GIT_VERSION//./ })
|
||||
declare -a GIT_MIN_VER=(2 8 0)
|
||||
for ((i=0; i<${#GIT_VER[@]}; i++))
|
||||
do
|
||||
if [ -z "${GIT_MIN_VER[i]}" ]
|
||||
then
|
||||
GIT_MIN_VER[i]=0
|
||||
fi
|
||||
if [ "${GIT_VER[i]}" -lt "${GIT_MIN_VER[i]}" ]
|
||||
then
|
||||
GIT_HAS_JOBS=0
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$GIT_HAS_JOBS" -ne 0 ]
|
||||
then
|
||||
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
|
||||
fi
|
||||
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
|
||||
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[@]}"
|
||||
if [ -z "${{matrix.cmake_tests}}" ]
|
||||
then
|
||||
./bootstrap.sh
|
||||
./b2 headers
|
||||
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
|
||||
then
|
||||
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
|
||||
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
|
||||
then
|
||||
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
|
||||
fi
|
||||
echo " ;" >> ~/user-config.jam
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Run tests
|
||||
if: matrix.cmake_tests == ''
|
||||
run: |
|
||||
cd boost-root
|
||||
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
|
||||
if [ -n "${{matrix.build_variant}}" ]
|
||||
then
|
||||
B2_ARGS+=("variant=${{matrix.build_variant}}")
|
||||
else
|
||||
B2_ARGS+=("variant=$DEFAULT_BUILD_VARIANT")
|
||||
fi
|
||||
if [ -n "${{matrix.threading}}" ]
|
||||
then
|
||||
B2_ARGS+=("threading=${{matrix.threading}}")
|
||||
fi
|
||||
if [ -n "${{matrix.ubsan}}" ]
|
||||
then
|
||||
export UBSAN_OPTIONS="print_stacktrace=1"
|
||||
B2_ARGS+=("cxxflags=-fsanitize=undefined -fno-sanitize-recover=undefined" "linkflags=-fsanitize=undefined -fuse-ld=gold" "define=UBSAN=1" "debug-symbols=on" "visibility=global")
|
||||
fi
|
||||
if [ -n "${{matrix.cxxflags}}" ]
|
||||
then
|
||||
B2_ARGS+=("cxxflags=${{matrix.cxxflags}}")
|
||||
fi
|
||||
if [ -n "${{matrix.linkflags}}" ]
|
||||
then
|
||||
B2_ARGS+=("linkflags=${{matrix.linkflags}}")
|
||||
fi
|
||||
B2_ARGS+=("libs/$LIBRARY/test")
|
||||
./b2 "${B2_ARGS[@]}"
|
||||
|
||||
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
|
403
.travis.yml
403
.travis.yml
@ -1,403 +0,0 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# Copyright 2019 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)
|
||||
|
||||
language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
dist: trusty
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- EMPTY=true
|
||||
|
||||
matrix:
|
||||
|
||||
exclude:
|
||||
- env: EMPTY=true
|
||||
|
||||
include:
|
||||
# gcc, Linux
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: gcc-4.4
|
||||
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.4
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: gcc-4.6
|
||||
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: gcc-4.7
|
||||
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-4.8
|
||||
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-4.9
|
||||
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-5
|
||||
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-6
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-8
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: gcc-9
|
||||
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-9
|
||||
sources:
|
||||
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: gcc-UBSAN
|
||||
env: UBSAN=1 TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-9
|
||||
sources:
|
||||
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||
|
||||
# clang, Linux
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang-3.4
|
||||
env: TOOLSET=clang COMPILER=clang++-3.4 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.4
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.4 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- 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
|
||||
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.5 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang-3.6
|
||||
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
- libstdc++-5-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.6 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang-3.7
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
- libstdc++-5-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.7 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-3.8
|
||||
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.8
|
||||
- libstdc++-6-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.8 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-3.9
|
||||
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.9
|
||||
- libstdc++-6-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-4
|
||||
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-4.0
|
||||
- libstdc++-6-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-5
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
- libstdc++-7-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-6
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-6.0
|
||||
- libstdc++-8-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-7
|
||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-7
|
||||
- libstdc++-8-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-8
|
||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-8
|
||||
- libstdc++-8-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-9
|
||||
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-9
|
||||
- libstdc++-9-dev
|
||||
sources:
|
||||
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-UBSAN
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-9
|
||||
- libstdc++-9-dev
|
||||
sources:
|
||||
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-libc++
|
||||
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a CXXFLAGS="-stdlib=libc++" LINKFLAGS="-stdlib=libc++"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-9
|
||||
- libc++-9-dev
|
||||
- libc++abi-9-dev
|
||||
sources:
|
||||
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
- os: linux
|
||||
dist: xenial
|
||||
compiler: clang-libc++-UBSAN
|
||||
env: UBSAN=1 TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a UBSAN_OPTIONS=print_stacktrace=1 CXXFLAGS="-stdlib=libc++" LINKFLAGS="-stdlib=libc++"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-9
|
||||
- libc++-9-dev
|
||||
- libc++abi-9-dev
|
||||
sources:
|
||||
- sourceline: "ppa:ubuntu-toolchain-r/test"
|
||||
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
|
||||
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
||||
|
||||
# clang, OS X
|
||||
# OS X builds are slow on Travis CI
|
||||
# - os: osx
|
||||
# env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
# osx_image: xcode9.4
|
||||
#
|
||||
# - os: osx
|
||||
# env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
# osx_image: xcode10.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,17
|
||||
osx_image: xcode11.2
|
||||
|
||||
install:
|
||||
- GIT_FETCH_JOBS=8
|
||||
- BOOST_BRANCH=develop
|
||||
- if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi
|
||||
- cd ..
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule init tools/boostdep
|
||||
- git submodule init tools/build
|
||||
- git submodule init tools/boost_install
|
||||
- git submodule init libs/headers
|
||||
- git submodule init libs/config
|
||||
- git submodule update --jobs $GIT_FETCH_JOBS
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/integer
|
||||
- python tools/boostdep/depinst/depinst.py --git_args "--jobs $GIT_FETCH_JOBS" integer
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
- BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null`
|
||||
- ./b2 -j $BUILD_JOBS libs/integer/test toolset=$TOOLSET cxxstd=$CXXSTD ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on visibility=global} ${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LINKFLAGS:+linkflags="$LINKFLAGS"}
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
@ -3,12 +3,9 @@
|
||||
# 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
|
||||
|
||||
# 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...3.20)
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(BoostInteger LANGUAGES CXX)
|
||||
project(boost_integer VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_integer INTERFACE)
|
||||
add_library(Boost::integer ALIAS boost_integer)
|
||||
@ -22,4 +19,5 @@ target_link_libraries(boost_integer
|
||||
Boost::core
|
||||
Boost::static_assert
|
||||
Boost::throw_exception
|
||||
Boost::type_traits
|
||||
)
|
||||
|
@ -22,8 +22,10 @@ compile-time value; and computing min and max of constant expressions.
|
||||
|
||||
### Build status
|
||||
|
||||
Master: [](https://ci.appveyor.com/project/Lastique/integer/branch/master) [](https://travis-ci.org/boostorg/integer)
|
||||
Develop: [](https://ci.appveyor.com/project/Lastique/integer/branch/develop) [](https://travis-ci.org/boostorg/integer)
|
||||
Branch | GitHub Actions | Drone | AppVeyor | Test Matrix | Dependencies |
|
||||
:-------------: | -------------- | ----- | -------- | ----------- | ------------ |
|
||||
[`master`](https://github.com/boostorg/integer/tree/master) | [](https://github.com/boostorg/integer/actions?query=branch%3Amaster) | [](https://drone.cpp.al/boostorg/integer) | [](https://ci.appveyor.com/project/Lastique/integer/branch/master) | [](http://www.boost.org/development/tests/master/developer/integer.html) | [](https://pdimov.github.io/boostdep-report/master/integer.html)
|
||||
[`develop`](https://github.com/boostorg/integer/tree/develop) | [](https://github.com/boostorg/integer/actions?query=branch%3Adevelop) | [](https://drone.cpp.al/boostorg/integer) | [](https://ci.appveyor.com/project/Lastique/integer/branch/develop) | [](http://www.boost.org/development/tests/develop/developer/integer.html) | [](https://pdimov.github.io/boostdep-report/develop/integer.html)
|
||||
|
||||
### License
|
||||
|
||||
|
25
appveyor.yml
25
appveyor.yml
@ -14,41 +14,40 @@ branches:
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- TOOLSET: msvc-14.0
|
||||
CXXSTD: 14,latest
|
||||
ADDRMD: 32,64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- TOOLSET: msvc-14.1
|
||||
CXXSTD: 14,17
|
||||
CXXSTD: 14,17,latest
|
||||
ADDRMD: 32,64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- TOOLSET: msvc-14.2
|
||||
ADDRMD: 32,64
|
||||
CXXSTD: 14,17
|
||||
CXXSTD: 14,17,20,latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- TOOLSET: msvc-14.3
|
||||
ADDRMD: 32,64
|
||||
CXXSTD: 14,17,20,latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||
- TOOLSET: clang-win
|
||||
ADDRMD: 32,64
|
||||
CXXSTD: 14,17
|
||||
CXXSTD: 14,17,latest
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
- TOOLSET: gcc
|
||||
CXXSTD: 03,11,14,1z
|
||||
CXXSTD: 11,14,1z
|
||||
ADDPATH: C:\cygwin\bin;
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- TOOLSET: gcc
|
||||
CXXSTD: 03,11,14,1z
|
||||
CXXSTD: 11,14,1z
|
||||
ADDPATH: C:\cygwin64\bin;
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- TOOLSET: gcc
|
||||
CXXSTD: 03,11,14,1z
|
||||
ADDPATH: C:\mingw\bin;
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- TOOLSET: gcc
|
||||
CXXSTD: 03,11,14,1z
|
||||
CXXSTD: 11,14,1z
|
||||
ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- TOOLSET: gcc
|
||||
CXXSTD: 03,11,14,1z
|
||||
CXXSTD: 11,14,1z
|
||||
ADDPATH: C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
|
||||
|
28
build.jam
Normal file
28
build.jam
Normal 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
|
||||
;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Copyright John Maddock 2005. Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
# file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
using quickbook ;
|
||||
|
||||
@ -25,7 +25,7 @@ boostbook standalone
|
||||
# How far down we go with TOC's
|
||||
<xsl:param>generate.section.toc.level=4
|
||||
# Path for links to Boost:
|
||||
<xsl:param>boost.root=../../../..
|
||||
<xsl:param>"boost.root=../../../.."
|
||||
|
||||
# PDF Options:
|
||||
# TOC Generation: this is needed for FOP-0.9 and later:
|
||||
@ -46,8 +46,8 @@ boostbook standalone
|
||||
# default pnd graphics are awful in PDF form,
|
||||
# better use SVG's instead:
|
||||
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
|
||||
<format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/regex/doc/html
|
||||
<format>pdf:<xsl:param>"admon.graphics.path=$(boost-images)/"
|
||||
<format>pdf:<xsl:param>"boost.url.prefix=https://www.boost.org/doc/libs/release/libs/integer/doc/html"
|
||||
;
|
||||
|
||||
install pdfinstall : standalone/<format>pdf : <location>. <install-type>PDF ;
|
||||
|
@ -286,5 +286,5 @@ pool library. The code had updates by Helmut Zeisel.
|
||||
Copyright 2005, 2013 Daryle Walker.
|
||||
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).
|
||||
https://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
@ -5,7 +5,7 @@
|
||||
[license
|
||||
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])
|
||||
[@https://www.boost.org/LICENSE_1_0.txt])
|
||||
]
|
||||
[authors [Dawes, Beman], [Walker, Daryle], [Prota, Gennaro], [Maddock, John]]
|
||||
[/last-revision $Date: 2008-02-21 12:58:15 +0000 (Thu, 21 Feb 2008) $]
|
||||
@ -285,7 +285,7 @@ The following table describes each template's criteria.
|
||||
[*only] if there exists a type with exactly N bits.]
|
||||
]
|
||||
[
|
||||
[[^boost::int_max_value_t<V>::last]]
|
||||
[[^boost::int_max_value_t<V>::least]]
|
||||
[The smallest, built-in, signed integral type that can hold all the values in the inclusive range ['0 - V].
|
||||
The parameter should be a positive number.]
|
||||
]
|
||||
@ -366,10 +366,10 @@ in [@../../../../boost/cstdint.hpp <boost/cstdint.hpp>].
|
||||
[section Credits]
|
||||
|
||||
The author of most of the Boost integer type choosing templates is
|
||||
[@http://www.boost.org/people/beman_dawes.html Beman Dawes].
|
||||
He gives thanks to Valentin Bonnard and [@http://www.boost.org/people/kevlin_henney.htm Kevlin Henney]
|
||||
[@https://www.boost.org/people/beman_dawes.html Beman Dawes].
|
||||
He gives thanks to Valentin Bonnard and [@https://www.boost.org/people/kevlin_henney.htm Kevlin Henney]
|
||||
for sharing their designs for similar templates.
|
||||
[@http://www.boost.org/people/daryle_walker.html Daryle Walker] designed the value-based sized templates.
|
||||
[@https://www.boost.org/people/daryle_walker.html Daryle Walker] designed the value-based sized templates.
|
||||
|
||||
[endsect]
|
||||
[endsect]
|
||||
@ -511,7 +511,7 @@ This prevents contamination of values by the higher, unused bits.
|
||||
|
||||
[section Credits]
|
||||
|
||||
The author of the Boost bit mask class templates is [@http://www.boost.org/people/daryle_walker.html Daryle Walker].
|
||||
The author of the Boost bit mask class templates is [@https://www.boost.org/people/daryle_walker.html Daryle Walker].
|
||||
|
||||
[endsect]
|
||||
[endsect]
|
||||
@ -583,7 +583,7 @@ could be used in generic programming, which requires the position to be availabl
|
||||
[section Credits]
|
||||
|
||||
The original version of the Boost binary logarithm class template was
|
||||
written by [@http://www.boost.org/people/daryle_walker.html Daryle Walker] and then
|
||||
written by [@https://www.boost.org/people/daryle_walker.html Daryle Walker] and then
|
||||
enhanced by Giovanni Bajo with support for compilers without partial template specialization.
|
||||
The current version was suggested, together with a reference implementation, by Vesa Karvonen.
|
||||
Gennaro Prota wrote the actual source file.
|
||||
@ -679,7 +679,7 @@ Sometimes the minimum or maximum of several values needs to be found for later c
|
||||
|
||||
[section Credits]
|
||||
|
||||
The author of the Boost compile-time extrema class templates is [@http://www.boost.org/people/daryle_walker.html Daryle Walker].
|
||||
The author of the Boost compile-time extrema class templates is [@https://www.boost.org/people/daryle_walker.html Daryle Walker].
|
||||
|
||||
[endsect]
|
||||
[endsect]
|
||||
|
@ -49,5 +49,5 @@ Wagstaff, Samuel S., ['The Joy of Factoring], Vol. 68. American Mathematical Soc
|
||||
Copyright 2018 Nick Thompson.
|
||||
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).
|
||||
https://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
@ -46,5 +46,5 @@ Wagstaff, Samuel S., ['The Joy of Factoring], Vol. 68. American Mathematical Soc
|
||||
Copyright 2018 Nick Thompson.
|
||||
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).
|
||||
https://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
// Copyright Beman Dawes and Daryle Walker 1999. 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/integer for documentation.
|
||||
// See https://www.boost.org/libs/integer for documentation.
|
||||
|
||||
// Revision History
|
||||
// 22 Sep 01 Added value-based integer templates. (Daryle Walker)
|
||||
@ -137,7 +137,7 @@ namespace boost
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT),
|
||||
"No suitable unsigned integer type with the requested number of bits is available.");
|
||||
#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
#if (defined(BOOST_BORLANDC) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
// It's really not clear why this workaround should be needed... shrug I guess! JM
|
||||
BOOST_STATIC_CONSTANT(int, s =
|
||||
6 +
|
||||
@ -219,7 +219,7 @@ namespace boost
|
||||
#endif
|
||||
struct uint_value_t
|
||||
{
|
||||
#if (defined(__BORLANDC__) || defined(__CODEGEAR__))
|
||||
#if (defined(BOOST_BORLANDC) || defined(__CODEGEAR__))
|
||||
// It's really not clear why this workaround should be needed... shrug I guess! JM
|
||||
#if defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
BOOST_STATIC_CONSTANT(unsigned, which =
|
||||
|
@ -3,9 +3,9 @@
|
||||
// (C) Copyright Daryle Walker 2001-2002.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
// See https://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_INTEGER_COMMON_FACTOR_HPP
|
||||
#define BOOST_INTEGER_COMMON_FACTOR_HPP
|
||||
|
@ -3,9 +3,9 @@
|
||||
// (C) Copyright Daryle Walker and Stephen Cleary 2001-2002.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
// See https://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_INTEGER_COMMON_FACTOR_CT_HPP
|
||||
#define BOOST_INTEGER_COMMON_FACTOR_CT_HPP
|
||||
@ -30,7 +30,7 @@ namespace detail
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, new_value2 = Value1 % Value2 );
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
#ifndef BOOST_BORLANDC
|
||||
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast<static_gcd_type>(Value)
|
||||
#else
|
||||
typedef static_gcd_helper_t self_type;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_INTEGER_COMMON_FACTOR_RT_HPP
|
||||
#define BOOST_INTEGER_COMMON_FACTOR_RT_HPP
|
||||
@ -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);
|
||||
@ -129,7 +125,7 @@ namespace boost {
|
||||
BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(T& val) BOOST_GCD_NOEXCEPT(T)
|
||||
{
|
||||
unsigned r = 0;
|
||||
while(0 == (val & 1u))
|
||||
while (T(0) == (val & 1u))
|
||||
{
|
||||
#ifdef _MSC_VER // VC++ can't handle operator >>= in constexpr code for some reason
|
||||
val = val >> 1;
|
||||
|
@ -2,14 +2,14 @@
|
||||
* (C) Copyright Nick Thompson 2018.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
* LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_INTEGER_EXTENDED_EUCLIDEAN_HPP
|
||||
#define BOOST_INTEGER_EXTENDED_EUCLIDEAN_HPP
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/core/invoke_swap.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace integer {
|
||||
@ -38,7 +38,7 @@ extended_euclidean(Z m, Z n)
|
||||
if (m < n)
|
||||
{
|
||||
swapped = true;
|
||||
boost::swap(m, n);
|
||||
boost::core::invoke_swap(m, n);
|
||||
}
|
||||
Z u0 = m;
|
||||
Z u1 = 1;
|
||||
|
@ -5,108 +5,113 @@
|
||||
// given number. Behavior is undefined if the argument is <= 0.
|
||||
//
|
||||
// Copyright (c) 2003-2004, 2008 Gennaro Prota
|
||||
// Copyright (c) 2022 Andrey Semashev
|
||||
//
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
|
||||
#ifndef BOOST_INTEGER_INTEGER_LOG2_HPP
|
||||
#define BOOST_INTEGER_INTEGER_LOG2_HPP
|
||||
|
||||
#include <assert.h>
|
||||
#ifdef __BORLANDC__
|
||||
#include <climits>
|
||||
#endif
|
||||
#include <boost/limits.hpp>
|
||||
#include <limits>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/core/bit.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/make_unsigned.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
int integer_log2_impl(T x, int n) {
|
||||
// helper to find the maximum power of two
|
||||
// less than p
|
||||
template< unsigned int p, unsigned int n, bool = ((2u * n) < p) >
|
||||
struct max_pow2_less :
|
||||
public max_pow2_less< p, 2u * n >
|
||||
{
|
||||
};
|
||||
|
||||
template< unsigned int p, unsigned int n >
|
||||
struct max_pow2_less< p, n, false >
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned int, value = n);
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
inline typename boost::disable_if< boost::is_integral< T >, int >::type integer_log2_impl(T x)
|
||||
{
|
||||
unsigned int n = detail::max_pow2_less<
|
||||
std::numeric_limits< T >::digits,
|
||||
CHAR_BIT / 2u
|
||||
>::value;
|
||||
|
||||
int result = 0;
|
||||
|
||||
while (x != 1) {
|
||||
|
||||
const T t = static_cast<T>(x >> n);
|
||||
if (t) {
|
||||
result += n;
|
||||
while (x != 1)
|
||||
{
|
||||
T t(x >> n);
|
||||
if (t)
|
||||
{
|
||||
result += static_cast< int >(n);
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
x = static_cast< T&& >(t);
|
||||
#else
|
||||
x = t;
|
||||
#endif
|
||||
}
|
||||
n /= 2;
|
||||
|
||||
n >>= 1u;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// helper to find the maximum power of two
|
||||
// less than p (more involved than necessary,
|
||||
// to avoid PTS)
|
||||
//
|
||||
template <int p, int n>
|
||||
struct max_pow2_less {
|
||||
|
||||
enum { c = 2*n < p };
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, value =
|
||||
c ? (max_pow2_less< c*p, 2*c*n>::value) : n);
|
||||
|
||||
};
|
||||
|
||||
template <>
|
||||
struct max_pow2_less<0, 0> {
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
|
||||
// this template is here just for Borland :(
|
||||
// we could simply rely on numeric_limits but sometimes
|
||||
template< typename T >
|
||||
inline typename boost::enable_if< boost::is_integral< T >, int >::type integer_log2_impl(T x)
|
||||
{
|
||||
// We could simply rely on numeric_limits but sometimes
|
||||
// Borland tries to use numeric_limits<const T>, because
|
||||
// of its usual const-related problems in argument deduction
|
||||
// - gps
|
||||
template <typename T>
|
||||
struct width {
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
BOOST_STATIC_CONSTANT(int, value = sizeof(T) * CHAR_BIT);
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(int, value = (std::numeric_limits<T>::digits));
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
} // detail
|
||||
|
||||
|
||||
// ---------
|
||||
// integer_log2
|
||||
// ---------------
|
||||
//
|
||||
template <typename T>
|
||||
int integer_log2(T x) {
|
||||
|
||||
assert(x > 0);
|
||||
|
||||
const int n = detail::max_pow2_less<
|
||||
detail::width<T> :: value, 4
|
||||
> :: value;
|
||||
|
||||
return detail::integer_log2_impl(x, n);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return static_cast< int >((sizeof(T) * CHAR_BIT - 1u) -
|
||||
boost::core::countl_zero(static_cast< typename boost::make_unsigned< T >::type >(x)));
|
||||
}
|
||||
|
||||
#if defined(BOOST_HAS_INT128)
|
||||
// We need to provide explicit overloads for __int128 because (a) boost/core/bit.hpp currently does not support it and
|
||||
// (b) std::numeric_limits are not specialized for __int128 in some standard libraries.
|
||||
inline int integer_log2_impl(boost::uint128_type x)
|
||||
{
|
||||
const boost::uint64_t x_hi = static_cast< boost::uint64_t >(x >> 64u);
|
||||
if (x_hi != 0u)
|
||||
return 127 - boost::core::countl_zero(x_hi);
|
||||
else
|
||||
return 63 - boost::core::countl_zero(static_cast< boost::uint64_t >(x));
|
||||
}
|
||||
|
||||
inline int integer_log2_impl(boost::int128_type x)
|
||||
{
|
||||
return detail::integer_log2_impl(static_cast< boost::uint128_type >(x));
|
||||
}
|
||||
#endif // defined(BOOST_HAS_INT128)
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
#endif // include guard
|
||||
// ------------
|
||||
// integer_log2
|
||||
// ------------
|
||||
template< typename T >
|
||||
inline int integer_log2(T x)
|
||||
{
|
||||
BOOST_ASSERT(x > 0);
|
||||
return detail::integer_log2_impl(x);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_INTEGER_INTEGER_LOG2_HPP
|
||||
|
@ -3,9 +3,9 @@
|
||||
// (C) Copyright Daryle Walker 2001.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
// See https://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_INTEGER_INTEGER_MASK_HPP
|
||||
#define BOOST_INTEGER_INTEGER_MASK_HPP
|
||||
|
@ -2,7 +2,7 @@
|
||||
* (C) Copyright Nick Thompson 2018.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
* LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_INTEGER_MOD_INVERSE_HPP
|
||||
#define BOOST_INTEGER_MOD_INVERSE_HPP
|
||||
|
@ -6,17 +6,18 @@
|
||||
//
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// ---------------------------------------------------
|
||||
// See http://www.boost.org/libs/integer for documentation.
|
||||
// See https://www.boost.org/libs/integer for documentation.
|
||||
// ------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
#ifndef BOOST_INTEGER_STATIC_LOG2_HPP
|
||||
#define BOOST_INTEGER_STATIC_LOG2_HPP
|
||||
|
||||
#include "boost/integer_fwd.hpp" // for boost::intmax_t
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/integer_fwd.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@ -122,6 +123,4 @@ namespace boost {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif // include guard
|
||||
|
@ -3,13 +3,14 @@
|
||||
// (C) Copyright Daryle Walker 2001.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
// See https://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_INTEGER_STATIC_MIN_MAX_HPP
|
||||
#define BOOST_INTEGER_STATIC_MIN_MAX_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/integer_fwd.hpp> // self include
|
||||
|
||||
namespace boost
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
// (C) Copyright Dave Abrahams and Daryle Walker 2001. 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/integer for documentation.
|
||||
// See https://www.boost.org/libs/integer for documentation.
|
||||
|
||||
#ifndef BOOST_INTEGER_FWD_HPP
|
||||
#define BOOST_INTEGER_FWD_HPP
|
||||
|
@ -3,14 +3,14 @@
|
||||
* Copyright Jens Maurer 2000
|
||||
* 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)
|
||||
* https://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
|
||||
*/
|
||||
|
||||
// See http://www.boost.org/libs/integer for documentation.
|
||||
// See https://www.boost.org/libs/integer for documentation.
|
||||
|
||||
|
||||
#ifndef BOOST_INTEGER_TRAITS_HPP
|
||||
@ -103,7 +103,7 @@ class integer_traits<wchar_t>
|
||||
// library: they are wrong!
|
||||
#if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__)
|
||||
public detail::integer_traits_base<wchar_t, WCHAR_MIN, WCHAR_MAX>
|
||||
#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__))
|
||||
#elif defined(BOOST_BORLANDC) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__))
|
||||
// No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned:
|
||||
public detail::integer_traits_base<wchar_t, 0, 0xffff>
|
||||
#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\
|
||||
|
@ -7,7 +7,7 @@ Automatic redirection failed, please go to
|
||||
<a href="doc/html/index.html">doc/html/index.html</a>.
|
||||
<P>Copyright Beman Dawes, Daryle Walker, Gennaro Prota and John Maddock 2001-2009</P>
|
||||
<P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt">
|
||||
LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P>
|
||||
LICENSE_1_0.txt</A> or copy at <A href="https://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -9,5 +9,6 @@
|
||||
"maintainers": [
|
||||
"Daryle Walker <darylew -at- hotmail.com>",
|
||||
"Andrey Semashev <andrey.semashev -at- gmail.com>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
#~ Copyright Rene Rivera 2008
|
||||
#~ 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)
|
||||
#~ (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,17 +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 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 ]
|
||||
@ -34,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 ] ]
|
||||
;
|
||||
|
@ -3,9 +3,9 @@
|
||||
// (C) Copyright Daryle Walker 2001, 2006.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
// See https://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 01 Dec 2006 Various fixes for old compilers (Joaquin M Lopez Munoz)
|
||||
@ -23,7 +23,8 @@
|
||||
#include <boost/mpl/list.hpp> // for boost::mpl::list
|
||||
#include <boost/operators.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/random.hpp>
|
||||
#include <boost/random/mersenne_twister.hpp>
|
||||
#include <boost/random/uniform_int.hpp>
|
||||
#include <boost/rational.hpp>
|
||||
|
||||
#include <istream> // for std::basic_istream
|
||||
|
@ -2,7 +2,7 @@
|
||||
* (C) Copyright Nick Thompson 2018.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
* LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "multiprecision_config.hpp"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
#include <iostream>
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (C) Copyright John Maddock 2017.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer/common_factor.hpp>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (C) Copyright John Maddock 2017.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer/common_factor.hpp>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2008.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <gmpxx.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer_fwd.hpp> // must be the only #include!
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp> // must be the only #include!
|
||||
|
||||
|
187
test/integer_log2_test.cpp
Normal file
187
test/integer_log2_test.cpp
Normal file
@ -0,0 +1,187 @@
|
||||
// Boost integer_log2.hpp test program --------------------------------------//
|
||||
|
||||
// (C) Copyright Andrey Semashev 2021.
|
||||
// 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)
|
||||
|
||||
// See https://www.boost.org for most recent version including documentation.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/integer/integer_log2.hpp>
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "multiprecision_config.hpp"
|
||||
|
||||
#if !defined(DISABLE_MP_TESTS)
|
||||
#include <boost/multiprecision/cpp_int.hpp>
|
||||
#endif
|
||||
|
||||
// Macros to compact code
|
||||
#define PRIVATE_LB_TEST( v, e ) BOOST_TEST( ::boost::integer_log2((v)) == e )
|
||||
|
||||
#define PRIVATE_PRINT_LB( v ) ::std::cout << "boost::integer_log2(" << (v) \
|
||||
<< ") = " << ::boost::integer_log2((v)) << '.' << ::std::endl
|
||||
|
||||
// Control to check for a compile-time error
|
||||
#ifndef CONTROL_LB_0_TEST
|
||||
#define PRIVATE_LB_0_TEST
|
||||
#else
|
||||
#define PRIVATE_LB_0_TEST PRIVATE_PRINT_LB( 0 )
|
||||
#endif
|
||||
|
||||
// Main testing function
|
||||
int main()
|
||||
{
|
||||
std::cout << "Doing tests on integer_log2." << std::endl;
|
||||
|
||||
PRIVATE_LB_0_TEST;
|
||||
|
||||
PRIVATE_LB_TEST( (unsigned char)1, 0 );
|
||||
PRIVATE_LB_TEST( (unsigned char)2, 1 );
|
||||
|
||||
PRIVATE_LB_TEST( 1, 0 );
|
||||
|
||||
PRIVATE_LB_TEST( 2, 1 );
|
||||
PRIVATE_LB_TEST( 3, 1 );
|
||||
|
||||
PRIVATE_LB_TEST( 4, 2 );
|
||||
PRIVATE_LB_TEST( 5, 2 );
|
||||
PRIVATE_LB_TEST( 6, 2 );
|
||||
PRIVATE_LB_TEST( 7, 2 );
|
||||
|
||||
PRIVATE_LB_TEST( 8, 3 );
|
||||
PRIVATE_LB_TEST( 9, 3 );
|
||||
PRIVATE_LB_TEST( 10, 3 );
|
||||
PRIVATE_LB_TEST( 11, 3 );
|
||||
PRIVATE_LB_TEST( 12, 3 );
|
||||
PRIVATE_LB_TEST( 13, 3 );
|
||||
PRIVATE_LB_TEST( 14, 3 );
|
||||
PRIVATE_LB_TEST( 15, 3 );
|
||||
|
||||
PRIVATE_LB_TEST( 16, 4 );
|
||||
PRIVATE_LB_TEST( 17, 4 );
|
||||
PRIVATE_LB_TEST( 18, 4 );
|
||||
PRIVATE_LB_TEST( 19, 4 );
|
||||
PRIVATE_LB_TEST( 20, 4 );
|
||||
PRIVATE_LB_TEST( 21, 4 );
|
||||
PRIVATE_LB_TEST( 22, 4 );
|
||||
PRIVATE_LB_TEST( 23, 4 );
|
||||
PRIVATE_LB_TEST( 24, 4 );
|
||||
PRIVATE_LB_TEST( 25, 4 );
|
||||
PRIVATE_LB_TEST( 26, 4 );
|
||||
PRIVATE_LB_TEST( 27, 4 );
|
||||
PRIVATE_LB_TEST( 28, 4 );
|
||||
PRIVATE_LB_TEST( 29, 4 );
|
||||
PRIVATE_LB_TEST( 30, 4 );
|
||||
PRIVATE_LB_TEST( 31, 4 );
|
||||
|
||||
PRIVATE_LB_TEST( 32, 5 );
|
||||
PRIVATE_LB_TEST( 33, 5 );
|
||||
PRIVATE_LB_TEST( 34, 5 );
|
||||
PRIVATE_LB_TEST( 35, 5 );
|
||||
PRIVATE_LB_TEST( 36, 5 );
|
||||
PRIVATE_LB_TEST( 37, 5 );
|
||||
PRIVATE_LB_TEST( 38, 5 );
|
||||
PRIVATE_LB_TEST( 39, 5 );
|
||||
PRIVATE_LB_TEST( 40, 5 );
|
||||
|
||||
PRIVATE_LB_TEST( 63, 5 );
|
||||
|
||||
PRIVATE_LB_TEST( 64, 6 );
|
||||
PRIVATE_LB_TEST( 65, 6 );
|
||||
|
||||
PRIVATE_LB_TEST( 127, 6 );
|
||||
|
||||
PRIVATE_LB_TEST( 128, 7 );
|
||||
PRIVATE_LB_TEST( 129, 7 );
|
||||
|
||||
PRIVATE_LB_TEST( 255, 7 );
|
||||
|
||||
PRIVATE_LB_TEST( 256, 8 );
|
||||
PRIVATE_LB_TEST( 257, 8 );
|
||||
|
||||
PRIVATE_LB_TEST( 511, 8 );
|
||||
|
||||
PRIVATE_LB_TEST( 512, 9 );
|
||||
PRIVATE_LB_TEST( 513, 9 );
|
||||
|
||||
PRIVATE_LB_TEST( 1023, 9 );
|
||||
|
||||
PRIVATE_LB_TEST( 1024, 10 );
|
||||
PRIVATE_LB_TEST( 1025, 10 );
|
||||
|
||||
PRIVATE_LB_TEST( 2047, 10 );
|
||||
|
||||
PRIVATE_LB_TEST( 2048, 11 );
|
||||
PRIVATE_LB_TEST( 2049, 11 );
|
||||
|
||||
PRIVATE_LB_TEST( 4095, 11 );
|
||||
|
||||
PRIVATE_LB_TEST( 4096, 12 );
|
||||
PRIVATE_LB_TEST( 4097, 12 );
|
||||
|
||||
PRIVATE_LB_TEST( 8191, 12 );
|
||||
|
||||
PRIVATE_LB_TEST( 8192, 13 );
|
||||
PRIVATE_LB_TEST( 8193, 13 );
|
||||
|
||||
PRIVATE_LB_TEST( 16383, 13 );
|
||||
|
||||
PRIVATE_LB_TEST( 16384, 14 );
|
||||
PRIVATE_LB_TEST( 16385, 14 );
|
||||
|
||||
PRIVATE_LB_TEST( 32767, 14 );
|
||||
|
||||
PRIVATE_LB_TEST( 32768, 15 );
|
||||
PRIVATE_LB_TEST( 32769, 15 );
|
||||
|
||||
PRIVATE_LB_TEST( 65535, 15 );
|
||||
|
||||
PRIVATE_LB_TEST( 65536, 16 );
|
||||
PRIVATE_LB_TEST( 65537, 16 );
|
||||
|
||||
#if defined(UINT32_C)
|
||||
PRIVATE_LB_TEST( UINT32_C(4294967295), 31 );
|
||||
#endif
|
||||
|
||||
#if defined(UINT64_C) && !defined(BOOST_NO_INT64_T)
|
||||
PRIVATE_LB_TEST( UINT64_C(4294967296), 32 );
|
||||
PRIVATE_LB_TEST( UINT64_C(4294967297), 32 );
|
||||
|
||||
PRIVATE_LB_TEST( UINT64_C(18446744073709551615), 63 );
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_INT128)
|
||||
PRIVATE_LB_TEST( boost::uint128_type(1u) << 64u, 64 );
|
||||
PRIVATE_LB_TEST( (boost::uint128_type(1u) << 64u) + 1u, 64 );
|
||||
|
||||
PRIVATE_LB_TEST( ~boost::uint128_type(0u), 127 );
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_MP_TESTS)
|
||||
PRIVATE_LB_TEST( boost::multiprecision::cpp_int(1), 0 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::cpp_int(2), 1 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::cpp_int(3), 1 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::cpp_int(65535), 15 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::cpp_int(65536), 16 );
|
||||
|
||||
PRIVATE_LB_TEST( boost::multiprecision::int1024_t(1), 0 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::int1024_t(2), 1 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::int1024_t(3), 1 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::int1024_t(65535), 15 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::int1024_t(65536), 16 );
|
||||
|
||||
PRIVATE_LB_TEST( boost::multiprecision::uint1024_t(1), 0 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::uint1024_t(2), 1 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::uint1024_t(3), 1 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::uint1024_t(65535), 15 );
|
||||
PRIVATE_LB_TEST( boost::multiprecision::uint1024_t(65536), 16 );
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer/integer_mask.hpp> // must be the only #include!
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
// (C) Copyright Daryle Walker 2001.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
// See https://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 23 Sep 2001 Initial version (Daryle Walker)
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#include <boost/cstdlib.hpp> // for boost::exit_success
|
||||
#include <boost/integer/integer_mask.hpp> // for boost::high_bit_mask_t, etc.
|
||||
|
@ -5,17 +5,17 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
// See http://www.boost.org/libs/integer for documentation.
|
||||
// See https://www.boost.org/libs/integer for documentation.
|
||||
|
||||
// Revision History
|
||||
// 04 Oct 01 Added tests for new templates; rewrote code (Daryle Walker)
|
||||
// 10 Mar 01 Boost Test Library now used for tests (Beman Dawes)
|
||||
// 31 Aug 99 Initial version
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp> // for main, BOOST_TEST
|
||||
#include <boost/core/lightweight_test.hpp> // for main, BOOST_TEST
|
||||
#include <boost/integer.hpp> // for boost::int_t, boost::uint_t
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/bool.hpp> // for mpl::true_ and false_
|
||||
@ -27,7 +27,7 @@
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(disable:4127) // conditional expression is constant
|
||||
#endif
|
||||
#if defined( __BORLANDC__ )
|
||||
#if defined( BOOST_BORLANDC )
|
||||
# pragma option -w-8008 -w-8066 // condition is always true
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer_traits.hpp> // must be the only #include!
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright Jens Maurer 2000
|
||||
* 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)
|
||||
* https://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
@ -17,7 +17,7 @@
|
||||
// use int64_t instead of long long for better portability
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
/*
|
||||
* General portability note:
|
||||
@ -35,6 +35,7 @@ namespace fix{
|
||||
inline int make_char_numeric_for_streaming(char c) { return c; }
|
||||
inline int make_char_numeric_for_streaming(signed char c) { return c; }
|
||||
inline int make_char_numeric_for_streaming(unsigned char c) { return c; }
|
||||
inline long long int make_char_numeric_for_streaming(wchar_t c) { return c; }
|
||||
}
|
||||
using namespace fix;
|
||||
#else
|
||||
@ -42,6 +43,7 @@ template<typename T> inline T make_char_numeric_for_streaming(T x) { return x; }
|
||||
inline int make_char_numeric_for_streaming(char c) { return c; }
|
||||
inline int make_char_numeric_for_streaming(signed char c) { return c; }
|
||||
inline int make_char_numeric_for_streaming(unsigned char c) { return c; }
|
||||
inline long long int make_char_numeric_for_streaming(wchar_t c) { return c; }
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* (C) Copyright Nick Thompson 2018.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
* LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include "multiprecision_config.hpp"
|
||||
|
@ -1,17 +1,18 @@
|
||||
// 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
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_INTEGER_TEST_MULTIPRECISION_CONFIG_HPP_INCLUDED_
|
||||
#define BOOST_INTEGER_TEST_MULTIPRECISION_CONFIG_HPP_INCLUDED_
|
||||
|
||||
#include <boost/config.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)
|
||||
// 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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer/static_log2.hpp> // must be the only #include!
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
// (C) Copyright Daryle Walker 2001.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
// See https://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 01 Oct 2001 Initial version (Daryle Walker)
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp> // for main
|
||||
#include <boost/core/lightweight_test.hpp> // for main
|
||||
|
||||
#include <boost/cstdlib.hpp> // for boost::exit_success
|
||||
#include <boost/integer/static_log2.hpp> // for boost::static_log2
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright John Maddock 2009.
|
||||
// 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)
|
||||
// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer/static_min_max.hpp> // must be the only #include!
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
// (C) Copyright Daryle Walker 2001.
|
||||
// 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)
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
// See https://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 23 Sep 2001 Initial version (Daryle Walker)
|
||||
|
||||
#include <boost/detail/lightweight_test.hpp> // for main, BOOST_TEST
|
||||
#include <boost/core/lightweight_test.hpp> // for main, BOOST_TEST
|
||||
|
||||
#include <boost/cstdlib.hpp> // for boost::exit_success
|
||||
#include <boost/integer/static_min_max.hpp> // for boost::static_signed_min, etc.
|
||||
|
Reference in New Issue
Block a user