From cada8c11df0ee360c2a05b0f44daeae6893419e4 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Thu, 3 Aug 2023 10:28:59 -0400 Subject: [PATCH 1/3] Fix definition of BOOST_TEST_PRIxPTR for glibc 2.2-2.17 --- include/boost/test/impl/execution_monitor.ipp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp index e81bce0a6d..848670b80c 100644 --- a/include/boost/test/impl/execution_monitor.ipp +++ b/include/boost/test/impl/execution_monitor.ipp @@ -194,9 +194,19 @@ namespace { void _set_se_translator( void* ) {} } # include #endif -#if !defined(BOOST_MSSTL_VERSION) || (BOOST_MSSTL_VERSION >= 120) +#if (!defined(BOOST_MSSTL_VERSION) || (BOOST_MSSTL_VERSION >= 120)) && (!defined(__GLIBC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2)))) +// glibc 2.2 - 2.17 required __STDC_FORMAT_MACROS to be defined for use of PRIxPTR +# if defined(__GLIBC__) && !((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 18))) +# ifndef __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# define BOOST_TEST_DEFINED_STDC_FORMAT_MACROS +# endif +# endif # include # define BOOST_TEST_PRIxPTR PRIxPTR +# ifdef BOOST_TEST_DEFINED_STDC_FORMAT_MACROS +# undef __STDC_FORMAT_MACROS +# endif #else # define BOOST_TEST_PRIxPTR "08lx" #endif From a6063692a714d87584e9b9a940a8633b8cb6479a Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Fri, 4 Aug 2023 15:15:31 +0200 Subject: [PATCH 2/3] Fix MSVC compiler warning (#390) Remove `std::move` on a temporary object to fix the following level 4 warning with Visual Studio 17.4 and later: warning C5263: calling 'std::move' on a temporary object prevents copy elision --- include/boost/test/data/monomorphic/grid.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/test/data/monomorphic/grid.hpp b/include/boost/test/data/monomorphic/grid.hpp index 62036313a4..e557da6167 100644 --- a/include/boost/test/data/monomorphic/grid.hpp +++ b/include/boost/test/data/monomorphic/grid.hpp @@ -56,7 +56,7 @@ class grid { // Constructor explicit iterator( dataset1_iter iter1, DataSet2 const& ds2 ) : m_iter1( std::move( iter1 ) ) - , m_iter2( std::move( ds2.begin() ) ) + , m_iter2( ds2.begin() ) , m_ds2( &ds2 ) , m_ds2_pos( 0 ) {} From 728582717dd601d3b900d621a91488b0d5a84377 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Wed, 15 Nov 2023 15:20:39 +0100 Subject: [PATCH 3/3] Remove C++03 Testing and Fix Clang STL Failures (#400) * Remove C++03 Testing * Add cxx14 requirement to boost.mp test * Fix jamfile syntax * Remove clang 2b runs * Remove GCC-4.8 * Add doc/examples to depinst * Fix clang 11-14 STL failures --- .github/workflows/ci.yml | 53 ++++++++++++---------------------------- README.md | 2 +- test/Jamfile.v2 | 2 +- 3 files changed, 17 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 814fcfb660..1618cec0c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,31 +38,15 @@ jobs: fail-fast: false matrix: include: - - toolset: gcc-4.6 - cxxstd: "03" - address_model: 64 - os: ubuntu-latest - container: ubuntu:16.04 - install: - - g++-4.6 - sources: - - "ppa:ubuntu-toolchain-r/test" - - toolset: gcc-4.8 - cxxstd: "03" - address_model: 64 - os: ubuntu-latest - container: ubuntu:18.04 - install: - - g++-4.8 - toolset: gcc-5 - cxxstd: "03,11" + cxxstd: "11" address_model: 64 os: ubuntu-latest container: ubuntu:16.04 install: - g++-5-multilib - toolset: gcc-5 - cxxstd: "03-gnu,11-gnu" + cxxstd: "11-gnu" address_model: 64 os: ubuntu-latest container: ubuntu:16.04 @@ -135,30 +119,23 @@ jobs: - g++-12-multilib # Linux, clang - - toolset: clang - compiler: clang++-3.7 - cxxstd: "03" - os: ubuntu-latest - container: ubuntu:16.04 - install: - - clang-3.7 - toolset: clang compiler: clang++-3.8 - cxxstd: "03,11" + cxxstd: "11" os: ubuntu-latest container: ubuntu:16.04 install: - clang-3.8 - toolset: clang compiler: clang++-3.9 - cxxstd: "03,11,14" + cxxstd: "11,14" os: ubuntu-latest container: ubuntu:18.04 install: - clang-3.9 - toolset: clang compiler: clang++-4.0 - cxxstd: "03,11" + cxxstd: "11" os: ubuntu-latest container: ubuntu:18.04 install: @@ -208,37 +185,37 @@ jobs: - clang-10 - toolset: clang compiler: clang++-11 - cxxstd: "17,20" + cxxstd: "17" os: ubuntu-22.04 install: - clang-11 - toolset: clang compiler: clang++-12 - cxxstd: "20,2b" + cxxstd: "17" os: ubuntu-22.04 install: - clang-12 - toolset: clang compiler: clang++-13 - cxxstd: "20,2b" + cxxstd: "17" os: ubuntu-22.04 install: - clang-13 - toolset: clang compiler: clang++-14 - cxxstd: "20,2b" + cxxstd: "17" os: ubuntu-22.04 install: - clang-14 - toolset: clang compiler: clang++-14 - cxxstd: "20-gnu,2b-gnu" + cxxstd: "17-gnu" os: ubuntu-22.04 install: - clang-14 - toolset: clang compiler: clang++-15 - cxxstd: "20,2b" + cxxstd: "20" os: ubuntu-22.04 install: - clang-15 @@ -248,7 +225,7 @@ jobs: - "https://apt.llvm.org/llvm-snapshot.gpg.key" - toolset: clang compiler: clang++-15 - cxxstd: "20,2b" + cxxstd: "20" os: ubuntu-22.04 install: - clang-15 @@ -277,7 +254,7 @@ jobs: cxxstd: "11,14" os: macos-11 - toolset: clang - cxxstd: "20,2b" + cxxstd: "20" os: macos-12 runs-on: ${{matrix.os}} @@ -428,7 +405,7 @@ jobs: cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY git submodule update --init tools/boostdep DEPINST_ARGS+=("$LIBRARY") - python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}" + python tools/boostdep/depinst/depinst.py -I doc/examples "${DEPINST_ARGS[@]}" if [ -z "${{matrix.cmake_tests}}" ] then ./bootstrap.sh @@ -527,7 +504,7 @@ jobs: cd boost-root xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY% + python tools/boostdep/depinst/depinst.py -I doc/examples --git_args "--jobs 3" %LIBRARY% cmd /c bootstrap b2 -d0 headers diff --git a/README.md b/README.md index f91febad7d..19ff83c455 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![boosttest logo](doc/html/images/boost.test.logo.png) # What is Boost.Test? -Boost.Test is a C++03/11/14/17 unit testing library, available on a wide range of platforms and compilers. +Boost.Test is a C++11/14/17 unit testing library, available on a wide range of platforms and compilers. The library is part of [Boost](http://www.boost.org). The latest release of the library is available from the boost web site. diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 7cef49831d..f92dd0ab61 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -166,7 +166,7 @@ test-suite "writing-test-ts" [ boost.test-self-test run : writing-test-ts : collection-comparison-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx11_unified_initialization_syntax ] ] # required by the test content [ boost.test-self-test run : writing-test-ts : dont_print_log_value-test : : : : : : $(requirements_datasets) ] [ boost.test-self-test run : writing-test-ts : fp-comparisons-test : : : : : : $(requirements_boost_test_full_support) ] - [ boost.test-self-test run : writing-test-ts : fp-multiprecision-comparison-test : : : : : : $(requirements_boost_test_full_support) ] + [ boost.test-self-test run : writing-test-ts : fp-multiprecision-comparison-test : : : : : : $(requirements_boost_test_full_support) [ requires cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates cxx14_constexpr ] ] [ boost.test-self-test run : writing-test-ts : fp-no-comparison-for-incomplete-types-test ] [ boost.test-self-test run : writing-test-ts : fp-relational-operator ] [ boost.test-self-test run : writing-test-ts : output_test_stream-test ]