From 869fcaf33f0bc0dd53d60e9f8f5be38a4a7cae30 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Tue, 4 Nov 2025 20:09:22 +0100 Subject: [PATCH 1/8] adapted core to Mp11-based index specification in MultiIndex --- .github/workflows/ci.yml | 1 + include/boost/bimap/detail/bimap_core.hpp | 13 ++++ .../boost/bimap/detail/mpl_to_mp11_list.hpp | 63 +++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 include/boost/bimap/detail/mpl_to_mp11_list.hpp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e436f529..48cf4308 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: - master - develop - feature/** + - fix/** env: UBSAN_OPTIONS: print_stacktrace=1 diff --git a/include/boost/bimap/detail/bimap_core.hpp b/include/boost/bimap/detail/bimap_core.hpp index 0d2ca99b..55f4fad4 100644 --- a/include/boost/bimap/detail/bimap_core.hpp +++ b/include/boost/bimap/detail/bimap_core.hpp @@ -1,6 +1,7 @@ // Boost.Bimap // // Copyright (c) 2006-2007 Matias Capeletto +// Copyright (c) 2025 Joaquin M Lopez Munoz // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -45,6 +46,10 @@ #include #include +#ifndef BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT +#include +#endif + #include #include #include @@ -394,8 +399,16 @@ class bimap_core >::type complete_core_indices; +#ifndef BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT + + using core_indices = mpl_to_mp11_list< complete_core_indices >; + +#else + struct core_indices : public complete_core_indices {}; +#endif + // Define the core using compute_index_type to translate the // set type to an multi-index specification // -------------------------------------------------------------------- diff --git a/include/boost/bimap/detail/mpl_to_mp11_list.hpp b/include/boost/bimap/detail/mpl_to_mp11_list.hpp new file mode 100644 index 00000000..d1017c21 --- /dev/null +++ b/include/boost/bimap/detail/mpl_to_mp11_list.hpp @@ -0,0 +1,63 @@ +// Boost.Bimap +// +// Copyright (c) 2025 Joaquin M Lopez Munoz +// +// 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) + + +#ifndef BOOST_BIMAP_DETAIL_MPL_TO_MP11_LIST_HPP +#define BOOST_BIMAP_DETAIL_MPL_TO_MP11_LIST_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include + +/** \struct boost::bimaps::detail::mpl_to_mp11_list + +\brief Converts a MPL sequence to a Mp11 list + +\code +using mp11_list = mpl_to_mp11_list< mpl_sequence >; +\endcode + **/ + +#ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES + +namespace boost { +namespace bimaps { +namespace detail { + +template< typename First, typename Last, typename... Ts > +struct mpl_to_mp11_list_impl: mpl_to_mp11_list_impl +< + typename mpl::next::type, Last, + Ts..., typename mpl::deref::type +> {}; + +template< typename Last, typename... Ts > +struct mpl_to_mp11_list_impl< Last, Last, Ts... > +{ + using type = mp11::mp_list< Ts... >; +}; + +template< typename TypeList > +using mpl_to_mp11_list=typename mpl_to_mp11_list_impl +< + typename mpl::begin::type, + typename mpl::end::type +>::type; + +} // namespace detail +} // namespace bimaps +} // namespace boost + +#endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES + +#endif // BOOST_BIMAP_DETAIL_MPL_TO_MP11_LIST_HPP From dc4f1fc5fed79b4623bc07a65107713101aaffb8 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Tue, 4 Nov 2025 20:30:16 +0100 Subject: [PATCH 2/8] updated CI --- .github/workflows/ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48cf4308..69bb987b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,25 +175,33 @@ jobs: os: macos-14 runs-on: ${{matrix.os}} - container: ${{matrix.container}} + container: + image: ${{matrix.container}} + volumes: + - /node20217:/node20217:rw,rshared + - ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} defaults: run: shell: bash steps: + - name: Setup container environment + if: matrix.container + run: | + apt-get update + apt-get -y install sudo python3 git g++ curl xz-utils + if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then + # Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590 + curl -sL https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217 + fi + - name: Enable Node 16 run: | echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV - uses: actions/checkout@v3 - - name: Setup container environment - if: matrix.container - run: | - apt-get update - apt-get -y install sudo python3 git g++ - - name: Install packages if: matrix.install run: | @@ -238,14 +246,6 @@ jobs: fail-fast: false matrix: include: - - toolset: msvc-14.0 - cxxstd: 14,latest - addrmd: 32,64 - os: windows-2019 - - toolset: msvc-14.2 - cxxstd: "14,17,20,latest" - addrmd: 32,64 - os: windows-2019 - toolset: msvc-14.3 cxxstd: "14,17,20,latest" addrmd: 32,64 From 05bd73e28439a68d51ee7aa7857c81870d20a26e Mon Sep 17 00:00:00 2001 From: joaquintides Date: Tue, 4 Nov 2025 20:35:06 +0100 Subject: [PATCH 3/8] updated CI --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69bb987b..577e23e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: address-model: 32,64 - toolset: gcc-13 cxxstd: "11,14,17,20,2b" - container: ubuntu:23.04 + container: ubuntu:24.04 os: ubuntu-latest install: g++-13-multilib address-model: 32,64 @@ -149,13 +149,13 @@ jobs: - toolset: clang compiler: clang++-16 cxxstd: "11,14,17,20,2b" - container: ubuntu:23.04 + container: ubuntu:24.04 os: ubuntu-latest install: clang-16 - toolset: clang compiler: clang++-17 cxxstd: "11,14,17,20,2b" - container: ubuntu:23.10 + container: ubuntu:24.04 os: ubuntu-latest install: clang-17 - toolset: clang @@ -164,9 +164,6 @@ jobs: container: ubuntu:24.04 os: ubuntu-latest install: clang-18 - - toolset: clang - cxxstd: "11,14,17,20,2b" - os: macos-12 - toolset: clang cxxstd: "11,14,17,20,2b" os: macos-13 @@ -257,7 +254,7 @@ jobs: - toolset: gcc cxxstd: "11,14,17,2a" addrmd: 64 - os: windows-2019 + os: windows-2022 runs-on: ${{matrix.os}} From cc1343530d1b1ba9f21ba44c6b4e1de1d2d0d551 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Tue, 4 Nov 2025 20:47:44 +0100 Subject: [PATCH 4/8] removed Clang 5.0 -std=c++1z as not supported by Mp11 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 577e23e7..42c883b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: install: clang-4.0 - toolset: clang compiler: clang++-5.0 - cxxstd: "11,14,1z" + cxxstd: "11,14" os: ubuntu-latest container: ubuntu:18.04 install: clang-5.0 From 6fa01f74c45d82afc0c2817e3f835d4015a4be0c Mon Sep 17 00:00:00 2001 From: joaquintides Date: Tue, 4 Nov 2025 20:49:13 +0100 Subject: [PATCH 5/8] updated release notes. --- doc/release_notes.qbk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/release_notes.qbk b/doc/release_notes.qbk index 96fdfc95..8f983da0 100644 --- a/doc/release_notes.qbk +++ b/doc/release_notes.qbk @@ -14,6 +14,10 @@ http://www.boost.org/LICENSE_1_0.txt) [section Release notes] +[heading Boost 1.91 release] + +* Adapted the library to work with the latest updates of Boost.MultiIndex ([@https://github.com/boostorg/bimap/pull/49 PR#49]). + [heading Boost 1.85 release] * Fixed heterogeneous lookup for side collections ([@https://github.com/boostorg/bimap/pull/42 PR#42]). From b09beb74b4d0d43460aabc5d4cc51affe0997e21 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 5 Nov 2025 19:43:11 +0100 Subject: [PATCH 6/8] updated CI --- .github/workflows/ci.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42c883b5..2f5a998f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,22 +38,26 @@ jobs: address-model: 32,64 - toolset: gcc-7 cxxstd: "11,14,17" - os: ubuntu-20.04 + container: ubuntu:20.04 + os: ubuntu-latest install: g++-7-multilib address-model: 32,64 - toolset: gcc-8 cxxstd: "11,14,17,2a" - os: ubuntu-20.04 + container: ubuntu:20.04 + os: ubuntu-latest install: g++-8-multilib address-model: 32,64 - toolset: gcc-9 cxxstd: "11,14,17,2a" - os: ubuntu-20.04 + container: ubuntu:20.04 + os: ubuntu-latest install: g++-9-multilib address-model: 32,64 - toolset: gcc-10 cxxstd: "11,14,17,2a" - os: ubuntu-20.04 + container: ubuntu:20.04 + os: ubuntu-latest install: g++-10-multilib address-model: 32,64 - toolset: gcc-11 @@ -99,31 +103,37 @@ jobs: - toolset: clang compiler: clang++-6.0 cxxstd: "11,14,17" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:18.04 install: clang-6.0 - toolset: clang compiler: clang++-7 cxxstd: "11,14,17" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:18.04 install: clang-7 - toolset: clang compiler: clang++-8 cxxstd: "11,14,17" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:20.04 install: clang-8 - toolset: clang compiler: clang++-9 cxxstd: "11,14,17,2a" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:20.04 install: clang-9 - toolset: clang compiler: clang++-10 cxxstd: "11,14,17,2a" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:20.04 - toolset: clang compiler: clang++-11 cxxstd: "11,14,17,2a" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:20.04 - toolset: clang compiler: clang++-12 cxxstd: "11,14,17,20" From ac73e3d14cce973ec64bac1f77a1d7e8bf6fdf53 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 5 Nov 2025 19:44:18 +0100 Subject: [PATCH 7/8] updated CI --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f5a998f..4d7d4e17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,7 +137,8 @@ jobs: - toolset: clang compiler: clang++-12 cxxstd: "11,14,17,20" - os: ubuntu-20.04 + os: ubuntu-latest + container: ubuntu:20.04 - toolset: clang compiler: clang++-13 cxxstd: "11,14,17,20,2b" From 8593618721fbfcbe931c11a7dac5cf90d3560fc2 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 5 Nov 2025 19:54:27 +0100 Subject: [PATCH 8/8] updated CI --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7d4e17..a60d7006 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,16 +129,19 @@ jobs: cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 + install: clang-10 - toolset: clang compiler: clang++-11 cxxstd: "11,14,17,2a" os: ubuntu-latest container: ubuntu:20.04 + install: clang-11 - toolset: clang compiler: clang++-12 cxxstd: "11,14,17,20" os: ubuntu-latest container: ubuntu:20.04 + install: clang-12 - toolset: clang compiler: clang++-13 cxxstd: "11,14,17,20,2b"