Skip to content

Commit 162f57d

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature/cxx20-modules
2 parents cdec621 + 2fb81c2 commit 162f57d

File tree

7 files changed

+112
-23
lines changed

7 files changed

+112
-23
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,18 @@ jobs:
3939
install: g++-6
4040
- toolset: gcc-7
4141
cxxstd: "03,11,14,17"
42-
os: ubuntu-20.04
42+
container: ubuntu:20.04
43+
os: ubuntu-latest
4344
install: g++-7
4445
- toolset: gcc-8
4546
cxxstd: "03,11,14,17,2a"
46-
os: ubuntu-20.04
47+
container: ubuntu:20.04
48+
os: ubuntu-latest
4749
install: g++-8
4850
- toolset: gcc-9
4951
cxxstd: "03,11,14,17,2a"
50-
os: ubuntu-20.04
52+
container: ubuntu:20.04
53+
os: ubuntu-latest
5154
- toolset: gcc-10
5255
cxxstd: "03,11,14,17,2a"
5356
os: ubuntu-22.04
@@ -65,10 +68,15 @@ jobs:
6568
container: ubuntu:24.04
6669
install: g++-13
6770
- toolset: gcc-14
68-
cxxstd: "03,11,14,17,20,2b"
71+
cxxstd: "03,11,14,17,20,23,2c"
6972
os: ubuntu-latest
7073
container: ubuntu:24.04
7174
install: g++-14
75+
- toolset: gcc-15
76+
cxxstd: "03,11,14,17,20,23,2c"
77+
os: ubuntu-latest
78+
container: ubuntu:25.04
79+
install: g++-15
7280
- toolset: clang
7381
compiler: clang++-3.9
7482
cxxstd: "03,11,14"
@@ -90,35 +98,45 @@ jobs:
9098
- toolset: clang
9199
compiler: clang++-6.0
92100
cxxstd: "03,11,14,17"
93-
os: ubuntu-20.04
101+
container: ubuntu:20.04
102+
os: ubuntu-latest
94103
install: clang-6.0
95104
- toolset: clang
96105
compiler: clang++-7
97106
cxxstd: "03,11,14,17"
98-
os: ubuntu-20.04
107+
container: ubuntu:20.04
108+
os: ubuntu-latest
99109
install: clang-7
100110
- toolset: clang
101111
compiler: clang++-8
102112
cxxstd: "03,11,14,17"
103-
os: ubuntu-20.04
113+
container: ubuntu:20.04
114+
os: ubuntu-latest
104115
install: clang-8
105116
- toolset: clang
106117
compiler: clang++-9
107118
cxxstd: "03,11,14,17,2a"
108-
os: ubuntu-20.04
119+
container: ubuntu:20.04
120+
os: ubuntu-latest
109121
install: clang-9
110122
- toolset: clang
111123
compiler: clang++-10
112124
cxxstd: "03,11,14,17,2a"
113-
os: ubuntu-20.04
125+
container: ubuntu:20.04
126+
os: ubuntu-latest
127+
install: clang-10
114128
- toolset: clang
115129
compiler: clang++-11
116130
cxxstd: "03,11,14,17,2a"
117-
os: ubuntu-20.04
131+
container: ubuntu:20.04
132+
os: ubuntu-latest
133+
install: clang-11
118134
- toolset: clang
119135
compiler: clang++-12
120136
cxxstd: "03,11,14,17,2a"
121-
os: ubuntu-20.04
137+
container: ubuntu:20.04
138+
os: ubuntu-latest
139+
install: clang-12
122140
- toolset: clang
123141
compiler: clang++-13
124142
cxxstd: "03,11,14,17,20,2b"
@@ -157,10 +175,16 @@ jobs:
157175
install: clang-18
158176
- toolset: clang
159177
compiler: clang++-19
160-
cxxstd: "03,11,14,17,20,2b"
161-
container: ubuntu:24.10
178+
cxxstd: "03,11,14,17,20,23,2c"
179+
container: ubuntu:24.04
162180
os: ubuntu-latest
163181
install: clang-19
182+
- toolset: clang
183+
compiler: clang++-20
184+
cxxstd: "03,11,14,17,20,23,2c"
185+
container: ubuntu:25.04
186+
os: ubuntu-latest
187+
install: clang-20
164188
- toolset: clang
165189
cxxstd: "03,11,14,17,20,2b"
166190
os: macos-13
@@ -300,7 +324,6 @@ jobs:
300324
fail-fast: false
301325
matrix:
302326
include:
303-
- os: ubuntu-20.04
304327
- os: ubuntu-22.04
305328
- os: ubuntu-24.04
306329
- os: macos-13
@@ -350,7 +373,6 @@ jobs:
350373
fail-fast: false
351374
matrix:
352375
include:
353-
- os: ubuntu-20.04
354376
- os: ubuntu-22.04
355377
- os: ubuntu-24.04
356378
- os: macos-13
@@ -410,7 +432,6 @@ jobs:
410432
fail-fast: false
411433
matrix:
412434
include:
413-
- os: ubuntu-20.04
414435
- os: ubuntu-22.04
415436
- os: ubuntu-24.04
416437
- os: macos-13
@@ -468,7 +489,6 @@ jobs:
468489
fail-fast: false
469490
matrix:
470491
include:
471-
- os: ubuntu-20.04
472492
- os: ubuntu-22.04
473493
- os: ubuntu-24.04
474494
- os: macos-13
@@ -497,7 +517,6 @@ jobs:
497517
fail-fast: false
498518
matrix:
499519
include:
500-
- os: ubuntu-20.04
501520
- os: ubuntu-22.04
502521
- os: ubuntu-24.04
503522
- os: macos-13
@@ -535,7 +554,6 @@ jobs:
535554
fail-fast: false
536555
matrix:
537556
include:
538-
- os: ubuntu-20.04
539557
- os: ubuntu-22.04
540558
- os: ubuntu-24.04
541559
- os: macos-13
@@ -567,7 +585,7 @@ jobs:
567585
ctest --output-on-failure --no-tests=error
568586
569587
cuda-linux:
570-
runs-on: ubuntu-20.04
588+
runs-on: ubuntu-22.04
571589

572590
steps:
573591
- uses: actions/checkout@v4

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
cmake_minimum_required(VERSION 3.5...3.31)
66

7-
project(boost_mp11 VERSION 1.88.0 LANGUAGES CXX)
7+
project(boost_mp11 VERSION 1.89.0 LANGUAGES CXX)
88

99
if (BOOST_USE_MODULES)
1010
add_library(boost_mp11 STATIC)

doc/mp11/changelog.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
////
2-
Copyright 2019-2024 Peter Dimov
2+
Copyright 2019-2025 Peter Dimov
33

44
Distributed under the Boost Software License, Version 1.0.
55

@@ -10,6 +10,10 @@ http://www.boost.org/LICENSE_1_0.txt
1010
[#changelog]
1111
# Revision History
1212

13+
## Changes in 1.88.0
14+
15+
* Fixed `mp_from_sequence` for non-integral values (accidentally broken in 1.83.0 due to offset support)
16+
1317
## Changes in 1.87.0
1418

1519
* Added `mp_lambda` (contributed by Joaquin M Lopez Munoz)

include/boost/mp11/detail/mp_map_find.hpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
#include <boost/mp11/utility.hpp>
1212
#include <boost/mp11/detail/config.hpp>
1313

14+
#if BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, >= 140000 )
15+
16+
#include <boost/mp11/detail/mp_list.hpp>
17+
#include <boost/mp11/detail/mp_append.hpp>
18+
#include <boost/mp11/detail/mp_front.hpp>
19+
20+
#endif
21+
1422
#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1930 )
1523

1624
// not exactly good practice, but...
@@ -26,6 +34,30 @@ namespace boost
2634
namespace mp11
2735
{
2836

37+
#if BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, >= 140000 )
38+
39+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120161
40+
41+
namespace detail
42+
{
43+
44+
template<class M, class K> struct mp_map_find_impl;
45+
46+
template<template<class...> class M, class... T, class K> struct mp_map_find_impl<M<T...>, K>
47+
{
48+
template<class U> using _f = mp_if<std::is_same<mp_front<U>, K>, mp_list<U>, mp_list<>>;
49+
50+
using _l = mp_append<_f<T>..., mp_list<void>>;
51+
52+
using type = mp_front<_l>;
53+
};
54+
55+
} // namespace detail
56+
57+
template<class M, class K> using mp_map_find = typename detail::mp_map_find_impl<M, K>::type;
58+
59+
#else
60+
2961
// mp_map_find
3062
namespace detail
3163
{
@@ -81,6 +113,8 @@ template<template<class...> class M, class... T, class K> struct mp_map_find_imp
81113

82114
template<class M, class K> using mp_map_find = typename detail::mp_map_find_impl<M, K>::type;
83115

116+
#endif
117+
84118
} // namespace mp11
85119
} // namespace boost
86120

include/boost/mp11/version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
// Same format as BOOST_VERSION:
1212
// major * 100000 + minor * 100 + patch
1313

14-
#define BOOST_MP11_VERSION 108800
14+
#define BOOST_MP11_VERSION 108900
1515

1616
#endif // #ifndef BOOST_MP11_VERSION_HPP_INCLUDED

test/Jamfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ run mp_similar.cpp ;
250250
run mp_map_find.cpp ;
251251
run mp_map_find_2.cpp ;
252252
run mp_map_find_3.cpp ;
253+
run mp_map_find_4.cpp ;
253254
run mp_map_contains.cpp ;
254255
run mp_map_insert.cpp ;
255256
run mp_map_replace.cpp ;

test/mp_map_find_4.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright 2016, 2020, 2024 Peter Dimov
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// https://www.boost.org/LICENSE_1_0.txt
4+
5+
#include <boost/mp11/map.hpp>
6+
#include <boost/mp11/list.hpp>
7+
#include <boost/core/lightweight_test_trait.hpp>
8+
9+
template<class T> struct Wrap
10+
{
11+
struct type {};
12+
};
13+
14+
int main()
15+
{
16+
using boost::mp11::mp_map_find;
17+
using boost::mp11::mp_list;
18+
19+
using Int = Wrap<int>::type;
20+
using Long = Wrap<long>::type;
21+
22+
using Map = mp_list<
23+
mp_list<Int, void>,
24+
mp_list<Long, void>
25+
>;
26+
27+
BOOST_TEST_TRAIT_SAME( mp_map_find<Map, Int>, mp_list<Int, void> );
28+
BOOST_TEST_TRAIT_SAME( mp_map_find<Map, Long>, mp_list<Long, void> );
29+
BOOST_TEST_TRAIT_SAME( mp_map_find<Map, int>, void );
30+
31+
return boost::report_errors();
32+
}

0 commit comments

Comments
 (0)