diff --git a/.drone.star b/.drone.star index 55115648c..b6b6f6e8f 100644 --- a/.drone.star +++ b/.drone.star @@ -31,29 +31,29 @@ def main(ctx): linux_cxx("Ubuntu g++-8 std=gnu++14 compile_fail examples", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++14', }, globalenv=globalenv), linux_cxx("Ubuntu g++-8 std=gnu++14 concepts", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 arithmetic_tests", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 cpp_int_tests", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 functions_and_limits", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 conversions performance", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 misc", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'misc', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 compile_fail examples", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-8 std=gnu++17 concepts", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), - - linux_cxx("Ubuntu g++-9 std=gnu++14 arithmetic_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++14 cpp_int_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++14 functions_and_limits", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++14 conversions performance", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++14 misc", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'misc', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++14 compile_fail examples", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++14 concepts", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), - - linux_cxx("Ubuntu g++-9 std=gnu++17 arithmetic_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++17 cpp_int_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++17 functions_and_limits", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++17 conversions performance", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++17 misc", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'misc', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++17 compile_fail examples", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), - linux_cxx("Ubuntu g++-9 std=gnu++17 concepts", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 arithmetic_tests", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 cpp_int_tests", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 functions_and_limits", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 conversions performance", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 misc", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'misc', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 compile_fail examples", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-8 std=gnu++17 concepts", "g++-8", packages="g++-8 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), + + linux_cxx("Ubuntu g++-9 std=gnu++14 arithmetic_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++14 cpp_int_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++14 functions_and_limits", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++14 conversions performance", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++14 misc", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'misc', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++14 compile_fail examples", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++14 concepts", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), + + linux_cxx("Ubuntu g++-9 std=gnu++17 arithmetic_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++17 cpp_int_tests", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++17 functions_and_limits", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'functions_and_limits', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++17 conversions performance", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TEST_SUITE': 'conversions performance', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++17 misc", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'misc', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++17 compile_fail examples", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TEST_SUITE': 'compile_fail examples', 'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', }, globalenv=globalenv), + linux_cxx("Ubuntu g++-9 std=gnu++17 concepts", "g++-9", packages="g++-9 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': 'gnu++17', 'TEST_SUITE': 'concepts', }, globalenv=globalenv), linux_cxx("Ubuntu g++-10 std=gnu++14 arithmetic_tests", "g++-10", packages="g++-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'arithmetic_tests', }, globalenv=globalenv), linux_cxx("Ubuntu g++-10 std=gnu++14 cpp_int_tests", "g++-10", packages="g++-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++14', 'TEST_SUITE': 'cpp_int_tests', }, globalenv=globalenv), @@ -127,12 +127,12 @@ def main(ctx): linux_cxx("Ubuntu g++-10 std=gnu++20 specfun_cpp_bin_float", "g++-10", packages="g++-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++20', 'TEST_SUITE': 'specfun_cpp_bin_float', }, globalenv=globalenv), # Sanitizers: - #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN arithmetic_tests", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address arithmetic_tests', }, globalenv=globalenv), - #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN cpp_int_test", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address cpp_int_tests', }, globalenv=globalenv), - #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN functions_and_limits", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address functions_and_limits', }, globalenv=globalenv), - #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN conversions", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address conversions', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', }, globalenv=globalenv), - #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN misc", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address misc', }, globalenv=globalenv), - #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN examples", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="xenial", llvm_ver="10", buildtype="boost", image=linuxglobalimage, environment={'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address examples', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', }, globalenv=globalenv), + #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN arithmetic_tests", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="focal", llvm_ver="10", buildtype="boost", image=cppalliance/droneubuntu2004:1, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address arithmetic_tests', }, globalenv=globalenv), + #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN cpp_int_test", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="focal", llvm_ver="10", buildtype="boost", image=cppalliance/droneubuntu2004:1, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address cpp_int_tests', }, globalenv=globalenv), + #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN functions_and_limits", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="focal", llvm_ver="10", buildtype="boost", image=cppalliance/droneubuntu2004:1, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address functions_and_limits', }, globalenv=globalenv), + #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN conversions", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="focal", llvm_ver="10", buildtype="boost", image=cppalliance/droneubuntu2004:1, environment={'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address conversions', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', }, globalenv=globalenv), + #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN misc", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="focal", llvm_ver="10", buildtype="boost", image=cppalliance/droneubuntu2004:1, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', 'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address misc', }, globalenv=globalenv), + #linux_cxx("Ubuntu clang++-10 std=c++20 ASAN examples", "clang++-10", packages="clang-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", llvm_os="focal", llvm_ver="10", buildtype="boost", image=cppalliance/droneubuntu2004:1, environment={'TEST_SUITE': 'cxxflags=-fsanitize=address linkflags=-fsanitize=address examples', 'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'c++20', }, globalenv=globalenv), linux_cxx("Ubuntu g++-10 std=gnu++20 USAN arithmetic_tests", "g++-10", packages="g++-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++20', 'TEST_SUITE': 'cxxflags=-fsanitize=undefined linkflags=-fsanitize=undefined arithmetic_tests', }, globalenv=globalenv), linux_cxx("Ubuntu g++-10 std=gnu++20 USAN cpp_int_tests", "g++-10", packages="g++-10 libgmp-dev libmpfr-dev libmpc-dev libmpfi-dev libtommath-dev", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++20', 'TEST_SUITE': 'cxxflags=-fsanitize=undefined linkflags=-fsanitize=undefined cpp_int_tests', }, globalenv=globalenv), diff --git a/.drone/drone.sh b/.drone/drone.sh new file mode 100644 index 000000000..c195ee574 --- /dev/null +++ b/.drone/drone.sh @@ -0,0 +1,43 @@ +#!/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 PATH=~/.local/bin:/usr/local/bin:$PATH + +echo '==================================> BEFORE_INSTALL' + +. .drone/before-install.sh + +echo '==================================> INSTALL' + +cd .. +for i in 1 2 3 4 5; do git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root && break || sleep 15; done +cd boost-root +for i in 1 2 3 4 5; do git submodule update --init tools/build && break || sleep 15; done +for i in 1 2 3 4 5; do git submodule update --init libs/config && break || sleep 15; done +for i in 1 2 3 4 5; do git submodule update --init libs/polygon && break || sleep 15; done +for i in 1 2 3 4 5; do git submodule update --init tools/boost_install && break || sleep 15; done +for i in 1 2 3 4 5; do git submodule update --init libs/headers && break || sleep 15; done +for i in 1 2 3 4 5; do git submodule update --init tools/boostdep && break || sleep 15; done +cp -r $TRAVIS_BUILD_DIR/* libs/multiprecision +for i in 1 2 3 4 5; do python tools/boostdep/depinst/depinst.py multiprecision && break || sleep 15; done +./bootstrap.sh +./b2 headers + +echo '==================================> BEFORE_SCRIPT' + +. $DRONE_BUILD_DIR/.drone/before-script.sh + +echo '==================================> SCRIPT' + +echo "using $TOOLSET : : $COMPILER : -std=$CXXSTD ;" > ~/user-config.jam +(cd libs/config/test && ../../../b2 print_config_info print_math_info toolset=$TOOLSET) +(cd libs/multiprecision/test && ../../../b2 -j3 toolset=$TOOLSET $TEST_SUITE define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER) + +echo '==================================> AFTER_SUCCESS' + +. $DRONE_BUILD_DIR/.drone/after-success.sh diff --git a/include/boost/multiprecision/cpp_bin_float.hpp b/include/boost/multiprecision/cpp_bin_float.hpp index ebace43ec..487eb5270 100644 --- a/include/boost/multiprecision/cpp_bin_float.hpp +++ b/include/boost/multiprecision/cpp_bin_float.hpp @@ -2340,13 +2340,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; diff --git a/include/boost/multiprecision/cpp_dec_float.hpp b/include/boost/multiprecision/cpp_dec_float.hpp index 00c264a0c..27cf3d6b3 100644 --- a/include/boost/multiprecision/cpp_dec_float.hpp +++ b/include/boost/multiprecision/cpp_dec_float.hpp @@ -3742,13 +3742,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; diff --git a/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp b/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp index 92593a1f2..7f364b844 100644 --- a/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp +++ b/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp @@ -39,7 +39,19 @@ struct numeric_limits::is_bounded; static constexpr bool is_modulo = std::numeric_limits::is_modulo; static constexpr bool is_iec559 = std::numeric_limits::is_iec559; + #ifdef _MSC_VER + # pragma warning(push) + # pragma warning(disable : 4996) + #elif (defined(__clang__) && (__clang_major__ >= 17)) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wdeprecated-declarations" + #endif static constexpr std::float_denorm_style has_denorm = std::numeric_limits::has_denorm; + #ifdef _MSC_VER + #pragma warning(pop) + #elif (defined(__clang__) && (__clang_major__ >= 17)) + # pragma clang diagnostic pop + #endif static constexpr bool has_infinity = std::numeric_limits::has_infinity; static constexpr bool has_quiet_NaN = std::numeric_limits::has_quiet_NaN; static constexpr bool has_signaling_NaN = std::numeric_limits::has_signaling_NaN; @@ -87,7 +99,19 @@ struct numeric_limits= 17)) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wdeprecated-declarations" + #endif static constexpr std::float_denorm_style has_denorm = std::denorm_present; + #ifdef _MSC_VER + #pragma warning(pop) + #elif (defined(__clang__) && (__clang_major__ >= 17)) + # pragma clang diagnostic pop + #endif static constexpr bool has_infinity = true; static constexpr bool has_quiet_NaN = true; static constexpr bool has_signaling_NaN = false; diff --git a/include/boost/multiprecision/cpp_int/limits.hpp b/include/boost/multiprecision/cpp_int/limits.hpp index a5349a802..280008acf 100644 --- a/include/boost/multiprecision/cpp_int/limits.hpp +++ b/include/boost/multiprecision/cpp_int/limits.hpp @@ -254,23 +254,19 @@ template , ExpressionTemplates> >::has_quiet_NaN; template constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; -#if defined(__clang__) && defined(__has_warning) -# if __has_warning("-Wdeprecated-declarations") +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" -# endif -#elif defined(_MSC_VER) -# pragma warning(push) -# pragma warning(disable:4996) #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; -#if defined(__clang__) && defined(__has_warning) -# if __has_warning("-Wdeprecated-declarations") +#ifdef _MSC_VER +#pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) # pragma clang diagnostic pop -# endif -#elif defined(_MSC_VER) -# pragma warning(pop) #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; diff --git a/include/boost/multiprecision/detail/number_base.hpp b/include/boost/multiprecision/detail/number_base.hpp index 99017c92e..94990d8e6 100644 --- a/include/boost/multiprecision/detail/number_base.hpp +++ b/include/boost/multiprecision/detail/number_base.hpp @@ -457,7 +457,7 @@ struct expression_storage_base }; template -struct expression_storage : public expression_storage_base::value> +struct expression_storage : public expression_storage_base::value || std::is_empty::value> {}; template diff --git a/include/boost/multiprecision/float128.hpp b/include/boost/multiprecision/float128.hpp index 5dfbcdd27..6b544e758 100644 --- a/include/boost/multiprecision/float128.hpp +++ b/include/boost/multiprecision/float128.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -295,6 +296,14 @@ struct float128_backend { return m_value; } + BOOST_MP_CXX14_CONSTEXPR float128_type& data() + { + return m_value; + } + BOOST_MP_CXX14_CONSTEXPR const float128_type& data() const + { + return m_value; + } }; inline BOOST_MP_CXX14_CONSTEXPR void eval_add(float128_backend& result, const float128_backend& a) @@ -710,6 +719,29 @@ inline boost::multiprecision::number rsqr return res; } +// The default std::abs(std::complex<>) implementation normalizes by max(|re|, |im|), +// which yields NaN when an input is infinite (inf/inf). +// Per IEEE 754, the result must be +infinity if either component is infinite, even if the other is NaN. +template +inline boost::multiprecision::number +abs BOOST_PREVENT_MACRO_SUBSTITUTION(const std::complex>& z) +{ + using number_type = boost::multiprecision::number; + const float128_type re_v = z.real().backend().value(); + const float128_type im_v = z.imag().backend().value(); +#ifdef BOOST_MP_USE_FLOAT128 + return number_type(::hypotq(re_v, im_v)); +#else + if (isinfq(re_v) || isinfq(im_v)) + { + return std::numeric_limits::infinity(); + } + const float128_type re_abs = re_v < 0 ? -re_v : re_v; + const float128_type im_abs = im_v < 0 ? -im_v : im_v; + return number_type(sqrtq(re_abs * re_abs + im_abs * im_abs)); +#endif +} + #ifndef BOOST_MP_USE_QUAD template inline boost::multiprecision::number copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const boost::multiprecision::number& a, const boost::multiprecision::number& b) @@ -833,12 +865,17 @@ class numeric_limits= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif static constexpr float_denorm_style has_denorm = denorm_present; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif static constexpr bool has_denorm_loss = true; static BOOST_MP_CXX14_CONSTEXPR number_type infinity() { return HUGE_VAL; /* conversion from double infinity OK */ } @@ -902,14 +939,20 @@ constexpr bool numeric_limits constexpr float_round_style numeric_limits >::round_style; + #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif } // namespace std diff --git a/include/boost/multiprecision/gmp.hpp b/include/boost/multiprecision/gmp.hpp index 9139974cb..e15e2604a 100644 --- a/include/boost/multiprecision/gmp.hpp +++ b/include/boost/multiprecision/gmp.hpp @@ -3645,13 +3645,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; @@ -3749,13 +3754,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; @@ -3863,13 +3873,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits >::has_denorm_loss; @@ -3978,13 +3993,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits >::has_denorm_loss; diff --git a/include/boost/multiprecision/mpfi.hpp b/include/boost/multiprecision/mpfi.hpp index 727d5b892..828ee338e 100644 --- a/include/boost/multiprecision/mpfi.hpp +++ b/include/boost/multiprecision/mpfi.hpp @@ -2438,13 +2438,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; @@ -2542,13 +2547,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; diff --git a/include/boost/multiprecision/mpfr.hpp b/include/boost/multiprecision/mpfr.hpp index ac1450d80..c426da53c 100644 --- a/include/boost/multiprecision/mpfr.hpp +++ b/include/boost/multiprecision/mpfr.hpp @@ -3496,13 +3496,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; @@ -3631,13 +3636,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits, ExpressionTemplates> >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits, ExpressionTemplates> >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits, ExpressionTemplates> >::has_denorm_loss; diff --git a/include/boost/multiprecision/tommath.hpp b/include/boost/multiprecision/tommath.hpp index 790fa2432..52db1b76f 100644 --- a/include/boost/multiprecision/tommath.hpp +++ b/include/boost/multiprecision/tommath.hpp @@ -1011,13 +1011,18 @@ constexpr bool numeric_limits constexpr bool numeric_limits >::has_signaling_NaN; #ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4996) +# pragma warning(push) +# pragma warning(disable : 4996) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif template constexpr float_denorm_style numeric_limits >::has_denorm; #ifdef _MSC_VER #pragma warning(pop) +#elif (defined(__clang__) && (__clang_major__ >= 17)) +# pragma clang diagnostic pop #endif template constexpr bool numeric_limits >::has_denorm_loss; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index fe0d61c59..1feb0bcc1 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -1062,6 +1062,7 @@ test-suite misc : [ run constexpr_test_cpp_int_5.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ run constexpr_test_cpp_int_6.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : "msvc:-constexpr:steps10000000" clang:-fconstexpr-steps=268435456 : no ] [ check-target-builds ../config//has_constexpr_limits : -fconstexpr-ops-limit=268435456 ] ] [ run constexpr_test_cpp_int_7.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : "msvc:-constexpr:steps10000000" clang:-fconstexpr-steps=268435456 : no ] ] + [ run constexpr_test_cpp_int_8.cpp : : : [ requires cxx14_constexpr cxx17_if_constexpr ] [ check-target-builds ../config//has_is_constant_evaluated : : no ] ] [ compile test_nothrow_cpp_int.cpp ] [ compile test_nothrow_cpp_rational.cpp ] @@ -1280,6 +1281,8 @@ test-suite misc : [ run git_issue_636.cpp : : : [ check-target-builds ../config//has_float128 : quadmath : no ] ] [ run git_issue_652.cpp ] [ run git_issue_734.cpp ] + [ run git_issue_743.cpp : : : [ check-target-builds ../config//has_float128 : quadmath : no ] ] + [ run git_issue_759.cpp : : : [ check-target-builds ../config//has_float128 : quadmath : no ] ] [ compile git_issue_98.cpp : [ check-target-builds ../config//has_float128 : TEST_FLOAT128 quadmath : ] [ check-target-builds ../config//has_gmp : TEST_GMP gmp : ] diff --git a/test/constexpr_test_cpp_int_8.cpp b/test/constexpr_test_cpp_int_8.cpp new file mode 100644 index 000000000..6c780bdae --- /dev/null +++ b/test/constexpr_test_cpp_int_8.cpp @@ -0,0 +1,37 @@ +// (C) Copyright Marco Ribeiro 2026. +// 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) + +#include "constexpr_arithmetric_test.hpp" +#include "boost/multiprecision/cpp_int.hpp" +#include "test.hpp" + +#if !defined(BOOST_MP_NO_CONSTEXPR_DETECTION) && !defined(DISABLE_TESTS) + +int main() +{ + namespace mp = boost::multiprecision; + + using int512_et_off = mp::number, mp::et_off>; + + using int512_et_on = mp::number, mp::et_on>; + + static_assert(mp::abs(int512_et_off(-12345)) == 12345); + static_assert(mp::conj(int512_et_off(100)) == 100); + static_assert(mp::proj(int512_et_off(100)) == 100); + static_assert(mp::powm(int512_et_off(-5), 2, 7) == 4); + + static_assert(mp::abs(int512_et_on(-12345)) == 12345); + static_assert(mp::conj(int512_et_on(100)) == 100); + static_assert(mp::proj(int512_et_on(100)) == 100); + static_assert(mp::powm(int512_et_on(-5), 2, 7) == 4); +} +#else +int main() {} +#endif + diff --git a/test/git_issue_743.cpp b/test/git_issue_743.cpp new file mode 100644 index 000000000..39cb41f27 --- /dev/null +++ b/test/git_issue_743.cpp @@ -0,0 +1,22 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright 2026 Matt Borland. 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: https://github.com/boostorg/multiprecision/issues/743 + +#include +#include "test.hpp" + +int main() +{ + using real = boost::multiprecision::float128; + + constexpr real value {5}; + BOOST_CHECK(value.backend().value() == value.backend().data()); + + real mutable_value {42}; + BOOST_CHECK(mutable_value.backend().value() == mutable_value.backend().data()); + + return boost::report_errors(); +} diff --git a/test/git_issue_759.cpp b/test/git_issue_759.cpp new file mode 100644 index 000000000..cd94a5a65 --- /dev/null +++ b/test/git_issue_759.cpp @@ -0,0 +1,68 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright 2026 Matt Borland. 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: https://github.com/boostorg/multiprecision/issues/759 + +#include +#include +#include +#include +#include "test.hpp" + +int main() +{ + using REAL = boost::multiprecision::float128; + + const REAL inf_v = std::numeric_limits::infinity(); + + { + using std::abs; + const REAL r = abs(inf_v); + BOOST_CHECK((boost::multiprecision::isinf)(r)); + } + + { + using std::abs; + const std::complex z{inf_v, REAL(0)}; + const REAL r = abs(z); + BOOST_CHECK((boost::multiprecision::isinf)(r)); + BOOST_CHECK(!(boost::multiprecision::isnan)(r)); + } + + { + using std::abs; + const std::complex z{REAL(0), inf_v}; + const REAL r = abs(z); + BOOST_CHECK((boost::multiprecision::isinf)(r)); + BOOST_CHECK(!(boost::multiprecision::isnan)(r)); + } + + { + using std::abs; + const std::complex z{-inf_v, REAL(3)}; + const REAL r = abs(z); + BOOST_CHECK((boost::multiprecision::isinf)(r)); + BOOST_CHECK(!(boost::multiprecision::isnan)(r)); + } + + { + // Per IEEE 754: hypot(inf, NaN) = inf. + using std::abs; + const REAL nan_v = std::numeric_limits::quiet_NaN(); + const std::complex z{inf_v, nan_v}; + const REAL r = abs(z); + BOOST_CHECK((boost::multiprecision::isinf)(r)); + } + + { + // Sanity check on a finite value: abs(3 + 4i) == 5. + using std::abs; + const std::complex z{REAL(3), REAL(4)}; + const REAL r = abs(z); + BOOST_CHECK_EQUAL(r, REAL(5)); + } + + return boost::report_errors(); +} diff --git a/test/test_cpp_double_float_bessel_versus_bin_and_dec.cpp b/test/test_cpp_double_float_bessel_versus_bin_and_dec.cpp index 13c393a04..e45eeac3b 100644 --- a/test/test_cpp_double_float_bessel_versus_bin_and_dec.cpp +++ b/test/test_cpp_double_float_bessel_versus_bin_and_dec.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////// -// Copyright Christopher Kormanyos 2024 - 2025. +// Copyright Christopher Kormanyos 2024 - 2026. // 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 @@ -120,11 +120,9 @@ struct stopwatch namespace util { template -auto util_pseudorandom_time_point_seed() -> UnsignedIntegralType +auto util_fixed_seed() -> UnsignedIntegralType { - using stopwatch_type = concurrency::stopwatch; - - return static_cast(stopwatch_type::now()); + return UnsignedIntegralType { UINT8_C(42) }; } } // namespace util @@ -192,8 +190,6 @@ auto do_trials(const std::size_t trial_count) -> void static std::size_t heat_count { }; static std::size_t total_count { }; - std::cout << "\nheat_count: " << ++heat_count << std::endl; - using dbl_float_type = boost::multiprecision::cpp_double_double; constexpr int local_digits10 = ((std::numeric_limits::digits10 < 32) ? 32 : std::numeric_limits::digits10); @@ -222,8 +218,8 @@ auto do_trials(const std::size_t trial_count) -> void { if(std::size_t { total_count % unsigned { UINT32_C(0x1000) } } == std::size_t { UINT8_C(0) }) { - eng_sgn.seed(util::util_pseudorandom_time_point_seed()); - eng_dig.seed(util::util_pseudorandom_time_point_seed()); + eng_sgn.seed(util::util_fixed_seed()); + eng_dig.seed(util::util_fixed_seed()); } ++total_count; @@ -321,27 +317,18 @@ auto do_trials(const std::size_t trial_count) -> void const double elapsed_flt { stopwatch_type::elapsed_time(my_stopwatch) }; #endif - std::stringstream strm { }; - - strm << std::fixed << std::setprecision(3) << "elapsed_dbl : " << elapsed_dbl << "s\n" - << std::fixed << std::setprecision(3) << "elapsed_dec : " << elapsed_dec << "s\n" - << std::fixed << std::setprecision(3) << "elapsed_bin : " << elapsed_bin << "s\n" - #if defined(BOOST_HAS_FLOAT128) - << std::fixed << std::setprecision(3) << "elapsed_flt : " << elapsed_flt << "s\n" - #endif - << std::fixed << std::setprecision(3) << "ratio (dec/dbl) : " << elapsed_dec / elapsed_dbl << "\n" - << std::fixed << std::setprecision(3) << "ratio (bin/dbl) : " << elapsed_bin / elapsed_dbl << "\n" - #if defined(BOOST_HAS_FLOAT128) - << std::fixed << std::setprecision(3) << "ratio (flt/dbl) : " << elapsed_flt / elapsed_dbl << "\n" - #endif - ; - BOOST_TEST(elapsed_dec / elapsed_dbl > 1.0); BOOST_TEST(elapsed_bin / elapsed_dbl > 1.0); - std::cout << strm.str() << std::endl; - - std::cout << "verifying results...\n"; + #if 0 + std::cout << "elapsed_dec: " << elapsed_dec + << ", elapsed_bin: " << elapsed_bin + << ", elapsed_dbl: " << elapsed_dbl + << ", elapsed_dec / elapsed_dbl: " << elapsed_dec / elapsed_dbl + << ", elapsed_bin / elapsed_dbl: " << elapsed_bin / elapsed_dbl + << std::endl + ; + #endif std::size_t count { UINT8_C(0) }; @@ -355,19 +342,32 @@ auto do_trials(const std::size_t trial_count) -> void const dbl_float_type ctrl_flt { flt_float_c_vec[count] }; #endif - BOOST_TEST(is_close_fraction(lhs, ctrl_dec, tol_dbl)); - BOOST_TEST(is_close_fraction(lhs, ctrl_bin, tol_dbl)); + const bool result_dec_is_ok { is_close_fraction(lhs, ctrl_dec, tol_dbl) }; + const bool result_bin_is_ok { is_close_fraction(lhs, ctrl_bin, tol_dbl) }; + #if defined(BOOST_HAS_FLOAT128) + const bool result_flt_is_ok { is_close_fraction(lhs, ctrl_flt, tol_dbl) }; + #endif + + BOOST_TEST(result_dec_is_ok); + if(!result_dec_is_ok) { std::stringstream strm { }; strm << std::setprecision(local_digits10) << "expected: " << ctrl_dec << ", got: " << lhs << ", a: " << dec_float_a_vec.at(count) << ", b: " << dec_float_b_vec.at(count); std::cout << strm.str() << std::endl; } + + BOOST_TEST(result_bin_is_ok); + if(!result_bin_is_ok) { std::stringstream strm { }; strm << std::setprecision(local_digits10) << "expected: " << ctrl_bin << ", got: " << lhs << ", a: " << bin_float_a_vec.at(count) << ", b: " << bin_float_b_vec.at(count); std::cout << strm.str() << std::endl; } + #if defined(BOOST_HAS_FLOAT128) - BOOST_TEST(is_close_fraction(lhs, ctrl_flt, tol_dbl)); + BOOST_TEST(result_flt_is_ok); + if(!result_flt_is_ok) { std::stringstream strm { }; strm << std::setprecision(local_digits10) << "expected: " << ctrl_flt << ", got: " << lhs << ", a: " << flt_float_a_vec.at(count) << ", b: " << flt_float_b_vec.at(count); std::cout << strm.str() << std::endl; } #endif ++count; } } +auto main() -> int; + auto main() -> int { - constexpr std::size_t trials { UINT32_C(0x4000) }; + constexpr std::size_t trials { UINT32_C(0x400) }; constexpr std::size_t heats { UINT32_C(0x4) }; for(std::size_t heat_count { UINT8_C(0) }; heat_count < heats; ++heat_count)