From df03ffc8ec2abad69535dfc5fd77fb221bbdb155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Fri, 28 Jun 2024 14:04:00 +0200 Subject: [PATCH 1/8] Fixes #241: flat_map should support same interface as std::map --- doc/container.qbk | 1 + include/boost/container/detail/flat_tree.hpp | 37 +++++++++++++++++-- .../container/detail/node_alloc_holder.hpp | 13 +++++++ include/boost/container/detail/tree.hpp | 25 +++++++++++++ include/boost/container/flat_map.hpp | 34 +++++++++++++++++ include/boost/container/map.hpp | 17 +++++++++ test/flat_map_test.cpp | 9 +++++ test/map_test.cpp | 9 +++++ 8 files changed, 142 insertions(+), 3 deletions(-) diff --git a/doc/container.qbk b/doc/container.qbk index 1581b37..4786cd2 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1421,6 +1421,7 @@ use [*Boost.Container]? There are several reasons for that: * [@https://github.com/boostorg/container/issues/266 GitHub #266: ['"small_vector is misaligned on the stack in 32 bits"]]. * [@https://github.com/boostorg/container/issues/259 GitHub #259: ['"Global variables"]]. * [@https://github.com/boostorg/container/issues/245 GitHub #245: ['"flat_tree::insert ordered range doesn't assert sorting"]]. + * [@https://github.com/boostorg/container/issues/241 GitHub #241: ['"flat_map should support same interface as std::map"]]. [endsect] diff --git a/include/boost/container/detail/flat_tree.hpp b/include/boost/container/detail/flat_tree.hpp index b356e94..98bd702 100644 --- a/include/boost/container/detail/flat_tree.hpp +++ b/include/boost/container/detail/flat_tree.hpp @@ -1127,9 +1127,6 @@ class flat_tree return ret; } - inline iterator erase(const_iterator position) - { return this->m_data.m_seq.erase(position); } - size_type erase(const key_type& k) { std::pair itp = this->equal_range(k); @@ -1149,6 +1146,40 @@ class flat_tree return ret; } + template + inline typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + , size_type>::type + erase(const K& k) + { + std::pair itp = this->equal_range(k); + size_type ret = static_cast(itp.second - itp.first); + if (ret) { + this->m_data.m_seq.erase(itp.first, itp.second); + } + return ret; + } + + template + inline typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + , size_type>::type + erase_unique(const K& k) + { + const_iterator i = static_cast(*this).find(k); + size_type ret = static_cast(i != this->cend()); + if (ret) + this->erase(i); + return ret; + } + + inline iterator erase(const_iterator position) + { return this->m_data.m_seq.erase(position); } + inline iterator erase(const_iterator first, const_iterator last) { return this->m_data.m_seq.erase(first, last); } diff --git a/include/boost/container/detail/node_alloc_holder.hpp b/include/boost/container/detail/node_alloc_holder.hpp index 96680dd..32023e3 100644 --- a/include/boost/container/detail/node_alloc_holder.hpp +++ b/include/boost/container/detail/node_alloc_holder.hpp @@ -536,6 +536,19 @@ struct node_alloc_holder return this->icont().erase_and_dispose(k, chain_holder.get_chain_builder()); } + template + inline size_type erase_key(const Key& k, KeyCompare cmp, version_1) + { + return this->icont().erase_and_dispose(k, cmp, Destroyer(this->node_alloc())); + } + + template + inline size_type erase_key(const Key& k, KeyCompare cmp, version_2) + { + allocator_multialloc_chain_node_deallocator chain_holder(this->node_alloc()); + return this->icont().erase_and_dispose(k, cmp, chain_holder.get_chain_builder()); + } + protected: struct cloner { diff --git a/include/boost/container/detail/tree.hpp b/include/boost/container/detail/tree.hpp index a189651..1a3aa42 100644 --- a/include/boost/container/detail/tree.hpp +++ b/include/boost/container/detail/tree.hpp @@ -1142,6 +1142,31 @@ class tree return ret; } + template + inline typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + , size_type>::type + erase(const K& k) + { return AllocHolder::erase_key(k, KeyNodeCompare(key_comp()), alloc_version()); } + + template + inline typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + , size_type>::type + erase_unique(const K& k) + { + iterator i = this->find(k); + size_type ret = static_cast(i != this->end()); + + if (ret) + this->erase(i); + return ret; + } + iterator erase(const_iterator first, const_iterator last) { BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first))); diff --git a/include/boost/container/flat_map.hpp b/include/boost/container/flat_map.hpp index 9a8abb8..cf6d650 100644 --- a/include/boost/container/flat_map.hpp +++ b/include/boost/container/flat_map.hpp @@ -1315,6 +1315,23 @@ class flat_map inline size_type erase(const key_type& x) { return m_flat_tree.erase_unique(x); } + //! Requires: This overload is available only if + //! key_compare::is_transparent exists. + //! + //! Effects: If present, erases the element in the container with key equivalent to x. + //! + //! Returns: Returns the number of erased elements (0/1). + template + inline BOOST_CONTAINER_DOC1ST + (size_type + , typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + BOOST_MOVE_I size_type>::type) + erase(const K& x) + { return m_flat_tree.erase_unique(x); } + //! Effects: Erases all the elements in the range [first, last). //! //! Returns: Returns last. @@ -2678,6 +2695,23 @@ class flat_multimap inline size_type erase(const key_type& x) { return m_flat_tree.erase(x); } + //! Requires: This overload is available only if + //! key_compare::is_transparent exists. + //! + //! Effects: Erases all elements in the container with key equivalent to x. + //! + //! Returns: Returns the number of erased elements. + template + inline BOOST_CONTAINER_DOC1ST + (size_type + , typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + BOOST_MOVE_I size_type>::type) + erase(const K& x) + { return m_flat_tree.erase(x); } + //! Effects: Erases all the elements in the range [first, last). //! //! Returns: Returns last. diff --git a/include/boost/container/map.hpp b/include/boost/container/map.hpp index 69c0526..cb13c03 100644 --- a/include/boost/container/map.hpp +++ b/include/boost/container/map.hpp @@ -969,6 +969,23 @@ class map inline size_type erase(const key_type& x) { return this->base_t::erase_unique(x); } + //! Requires: This overload is available only if + //! key_compare::is_transparent exists. + //! + //! Effects: If present, erases the element in the container with key equivalent to x. + //! + //! Returns: Returns the number of erased elements (0/1). + template + inline BOOST_CONTAINER_DOC1ST + (size_type + , typename dtl::enable_if_c< + dtl::is_transparent::value && //transparent + !dtl::is_convertible::value && //not convertible to iterator + !dtl::is_convertible::value //not convertible to const_iterator + BOOST_MOVE_I size_type>::type) + erase(const K& x) + { return this->base_t::erase_unique(x); } + #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Effects: Erases the element pointed to by p. diff --git a/test/flat_map_test.cpp b/test/flat_map_test.cpp index 84f5b3e..49d88f8 100644 --- a/test/flat_map_test.cpp +++ b/test/flat_map_test.cpp @@ -560,6 +560,15 @@ bool test_heterogeneous_lookups() if(cmmap1.equal_range(find_me).second->second != 'e') return false; + //erase + if (map1.erase(find_me) != 1) + return false; + if (map1.erase(find_me) != 0) + return false; + if (mmap1.erase(find_me) != 2) + return false; + if (mmap1.erase(find_me) != 0) + return false; return true; } diff --git a/test/map_test.cpp b/test/map_test.cpp index dd13491..4a3fddb 100644 --- a/test/map_test.cpp +++ b/test/map_test.cpp @@ -361,6 +361,15 @@ bool test_heterogeneous_lookups() if(cmmap1.equal_range(find_me).second->second != 'e') return false; + //erase + if (map1.erase(find_me) != 1) + return false; + if (map1.erase(find_me) != 0) + return false; + if (mmap1.erase(find_me) != 2) + return false; + if (mmap1.erase(find_me) != 0) + return false; return true; } From e0dd257c98cb756e8f61d14dd5eaa8aeb0b3791b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 30 Jun 2024 12:51:51 +0200 Subject: [PATCH 2/8] Remove deprecated actions/checkout@v3 --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfad3b9..9201e7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,6 @@ jobs: fi fi git config --global pack.threads 0 - - uses: actions/checkout@v3 - name: Install packages if: matrix.install @@ -565,7 +564,6 @@ jobs: runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v3 - name: Setup Boost shell: cmd From 9ebdbb8ab088ff0af3097dc462ebbf0c9c2d4580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 30 Jun 2024 15:53:08 +0200 Subject: [PATCH 3/8] Try the same approach as Boost.Core with snapshots --- .github/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9201e7b..d74e15b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -357,7 +357,6 @@ jobs: if [ -f "/etc/debian_version" ] then apt-get -o Acquire::Retries=$NET_RETRY_COUNT update - apt-get -o Acquire::Retries=$NET_RETRY_COUNT dist-upgrade -y if [ "$(apt-cache search "^python-is-python3$" | wc -l)" -ne 0 ] then PYTHON_PACKAGE="python-is-python3" @@ -424,8 +423,8 @@ jobs: done fi sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT dist-upgrade -y sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{join(matrix.install, ' ')}} + - name: Setup GCC Toolchain if: matrix.gcc_toolchain run: | @@ -437,6 +436,7 @@ jobs: 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 @@ -482,11 +482,25 @@ jobs: then DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS") fi + mkdir -p snapshot + cd snapshot + echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz" + curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz" + tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz" + if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ] + then + echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:" + ls -la + exit 1 + fi + rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz" cd .. git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root" cd boost-root - mkdir -p libs/$LIBRARY - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + mkdir -p libs + rm -rf "libs/$LIBRARY" + mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY" + rm -rf "../snapshot" git submodule update --init tools/boostdep DEPINST_ARGS+=("$LIBRARY") python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}" @@ -501,10 +515,11 @@ jobs: fi echo " ;" >> ~/user-config.jam fi + - name: Run tests if: matrix.cmake_tests == '' run: | - cd ../boost-root + cd boost-root B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}") if [ -n "${{matrix.build_variant}}" ] then @@ -535,6 +550,7 @@ jobs: fi B2_ARGS+=("libs/$LIBRARY/test") ./b2 "${B2_ARGS[@]}" + windows: strategy: fail-fast: false @@ -561,10 +577,10 @@ jobs: addrmd: 64 os: windows-2019 + timeout-minutes: 180 runs-on: ${{matrix.os}} steps: - - name: Setup Boost shell: cmd run: | @@ -578,16 +594,32 @@ jobs: 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 - xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + 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 + cd boost-root b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker + From 7d8040704a1d867ed26e97fdb0cda820aa59d8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 30 Jun 2024 21:54:03 +0200 Subject: [PATCH 4/8] macos-11 was deprecated/removed as GitHub-hosted macOS runner, use macos-14 instead. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d74e15b..7f6cbeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -326,10 +326,6 @@ jobs: #------------------ # MacOS, clang #------------------ - # Macos 11, clang - - toolset: clang - cxxstd: "11,14,17,2a" - os: macos-11 # Macos 12, clang - toolset: clang cxxstd: "11,14,17,20,2b" @@ -338,6 +334,10 @@ jobs: - toolset: clang cxxstd: "11,14,17,20,2b" os: macos-13 + # Macos 17, clang + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-14 timeout-minutes: 180 runs-on: ${{matrix.os}} From bdc734f1e0d88961b98ed29d440cd8e392f11a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 30 Jun 2024 23:06:08 +0200 Subject: [PATCH 5/8] Avoid noisy warnings when instantiating BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH --- include/boost/container/allocator_traits.hpp | 5 +++-- include/boost/container/detail/workaround.hpp | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index 1fefda5..dd5bf0e 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -49,9 +49,10 @@ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) +#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-result" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate @@ -75,7 +76,7 @@ #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9 #include -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) +#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED) #pragma GCC diagnostic pop #endif diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index 6beb7c2..d6407d4 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -236,4 +236,8 @@ namespace boost { # define BOOST_CONTAINER_CONSTANT_VAR static BOOST_CONSTEXPR_OR_CONST #endif +#if defined(__GNUC__) && ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600) +#define BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED +#endif + #endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP From 849f61275e02a86b33345e3cc5c487e588f3bcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 30 Jun 2024 23:27:08 +0200 Subject: [PATCH 6/8] Add gcc -14 and clang-18 --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f6cbeb..b857859 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,9 +128,16 @@ jobs: - toolset: gcc-13 cxxstd: "11,14,17,20,2b" os: ubuntu-latest - container: ubuntu:23.04 + container: ubuntu:24.04 install: g++-13-multilib address-model: 32,64 + # Linux, gcc-14 + - toolset: gcc-14 + cxxstd: "11,14,17,20,2b" + os: ubuntu-latest + container: ubuntu:24.04 + install: g++-14-multilib + address-model: 32,64 # Linux, gcc-12 UBSAN - name: UBSAN toolset: gcc-12 @@ -285,16 +292,23 @@ jobs: - toolset: clang compiler: clang++-16 cxxstd: "03,11,14,17,20,2b" - container: ubuntu:23.04 + container: ubuntu:24.04 os: ubuntu-latest install: clang-16 # Linux, clang-17 - toolset: clang compiler: clang++-17 cxxstd: "03,11,14,17,20,2b" - container: ubuntu:23.10 + container: ubuntu:24.04 os: ubuntu-latest install: clang-17 + # Linux, clang-18 + - toolset: clang + compiler: clang++-18 + cxxstd: "03,11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-18 # Linux, clang-15 libc++ - toolset: clang compiler: clang++-15 @@ -304,10 +318,17 @@ jobs: - clang-15 - libc++-15-dev - libc++abi-15-dev - sources: - - "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" - source_keys: - - "https://apt.llvm.org/llvm-snapshot.gpg.key" + cxxflags: -stdlib=libc++ + linkflags: -stdlib=libc++ + # Linux, clang-18 libc++ + - toolset: clang + compiler: clang++-18 + cxxstd: "03,11,14,17,20,2b" + os: ubuntu-24.04 + install: + - clang-18 + - libc++-18-dev + - libc++abi-18-dev cxxflags: -stdlib=libc++ linkflags: -stdlib=libc++ # Linux, clang-14 libc++, ubsan @@ -323,6 +344,19 @@ jobs: - clang-14 - libc++-14-dev - libc++abi-14-dev + # Linux, clang-18 libc++, ubsan + - name: UBSAN + toolset: clang + compiler: clang++-18 + cxxstd: "03,11,14,17,20" + cxxflags: -stdlib=libc++ + linkflags: -stdlib=libc++ + ubsan: 1 + os: ubuntu-24.04 + install: + - clang-18 + - libc++-18-dev + - libc++abi-18-dev #------------------ # MacOS, clang #------------------ From ebf698f8a37c8a1ef17790f6a4d2d242027abdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 1 Jul 2024 01:01:02 +0200 Subject: [PATCH 7/8] Adjust BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED since clang claims to be GCC 4.2 but supports this feature. --- include/boost/container/detail/workaround.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index d6407d4..055cf24 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -238,6 +238,8 @@ namespace boost { #if defined(__GNUC__) && ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600) #define BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED +#elif defined(__clang__) +#define BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED #endif #endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP From 3ed1c76efdce0585a4ff6f56fbca25e9559955ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 1 Jul 2024 01:01:42 +0200 Subject: [PATCH 8/8] Remove C++03 for clang/libc++ --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b857859..adeceab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -323,7 +323,7 @@ jobs: # Linux, clang-18 libc++ - toolset: clang compiler: clang++-18 - cxxstd: "03,11,14,17,20,2b" + cxxstd: "11,14,17,20,2b" os: ubuntu-24.04 install: - clang-18 @@ -348,7 +348,7 @@ jobs: - name: UBSAN toolset: clang compiler: clang++-18 - cxxstd: "03,11,14,17,20" + cxxstd: "11,14,17,20" cxxflags: -stdlib=libc++ linkflags: -stdlib=libc++ ubsan: 1