Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 46 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- master
- develop
- feature/**
- fix/**

env:
UBSAN_OPTIONS: print_stacktrace=1
Expand Down Expand Up @@ -37,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
Expand All @@ -67,7 +72,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
Expand All @@ -91,42 +96,52 @@ 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
- 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
install: clang-10
- toolset: clang
compiler: clang++-11
cxxstd: "11,14,17,2a"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install: clang-11
- toolset: clang
compiler: clang++-12
cxxstd: "11,14,17,20"
os: ubuntu-20.04
os: ubuntu-latest
container: ubuntu:20.04
install: clang-12
- toolset: clang
compiler: clang++-13
cxxstd: "11,14,17,20,2b"
Expand All @@ -148,13 +163,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
Expand All @@ -163,9 +178,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
Expand All @@ -174,25 +186,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: |
Expand Down Expand Up @@ -237,14 +257,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
Expand All @@ -256,7 +268,7 @@ jobs:
- toolset: gcc
cxxstd: "11,14,17,2a"
addrmd: 64
os: windows-2019
os: windows-2022

runs-on: ${{matrix.os}}

Expand Down
4 changes: 4 additions & 0 deletions doc/release_notes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -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]).
Expand Down
13 changes: 13 additions & 0 deletions include/boost/bimap/detail/bimap_core.hpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -45,6 +46,10 @@
#include <boost/bimap/detail/map_view_iterator.hpp>
#include <boost/bimap/detail/set_view_iterator.hpp>

#ifndef BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT
#include <boost/bimap/detail/mpl_to_mp11_list.hpp>
#endif

#include <boost/bimap/set_of.hpp>
#include <boost/bimap/unconstrained_set_of.hpp>
#include <boost/core/allocator_access.hpp>
Expand Down Expand Up @@ -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
// --------------------------------------------------------------------
Expand Down
63 changes: 63 additions & 0 deletions include/boost/bimap/detail/mpl_to_mp11_list.hpp
Original file line number Diff line number Diff line change
@@ -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 <boost/mp11/list.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/next.hpp>

/** \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<First>::type, Last,
Ts..., typename mpl::deref<First>::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<TypeList>::type,
typename mpl::end<TypeList>::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
Loading