Skip to content

Commit 890f032

Browse files
authored
removed Boost.MPL usage in favor of Boost.Mp11 (#87)
* omitted test_mpl_ops for now * made IndexSpecifierList a Mp11 sequence * made nested *_type_list's and tag Mp11 sequences * leftover MPL->Mp11 change * removed Clang 5.0 -std=c++1z as not supported by Mp11 * replaced boost::mpl::na with void as default index specifier arg * removed Clang 5.0 -std=c++1z as not supported by Mp11 (Drone) * replaced elementary MPL TMP with Mp11/std * replaced elementary MPL TMP with Mp11/std (tests) * leftover MPL #include * suppressed potential narrowing conversion warnings * enabled macro to support old interface, plus restored and augmented test_mpl_ops * removed secondary dependency to MPL thru Iterator * optimized Jamfile.v2 * added conditional support for old definition of tag * updated MPL support macro in tests * updated docs * stylistic * updated "cxxstd" in libraries.json * disabled test_serialization for Clang 3.5-3.6 due to lack of support from Boost.SmartPtr * fixed previous * removed no longer necessary workaround * removed redundant dependencies * updated test description
1 parent e2b50ef commit 890f032

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+871
-837
lines changed

.drone.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
319319
linux_pipeline(
320320
"Linux 18.04 Clang 5.0",
321321
"cppalliance/droneubuntu1804:1",
322-
{ TOOLSET: 'clang', COMPILER: 'clang++-5.0', CXXSTD: '11,14,1z' },
322+
{ TOOLSET: 'clang', COMPILER: 'clang++-5.0', CXXSTD: '11,14' },
323323
"clang-5.0",
324324
),
325325

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
install: clang-4.0
9494
- toolset: clang
9595
compiler: clang++-5.0
96-
cxxstd: "11,14,1z"
96+
cxxstd: "11,14"
9797
os: ubuntu-latest
9898
container: ubuntu:18.04
9999
install: clang-5.0

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ target_link_libraries(boost_multi_index
2020
Boost::container_hash
2121
Boost::core
2222
Boost::integer
23-
Boost::iterator
2423
Boost::move
25-
Boost::mpl
24+
Boost::mp11
2625
Boost::preprocessor
2726
Boost::smart_ptr
2827
Boost::static_assert

build.jam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ constant boost_dependencies :
1212
/boost/container_hash//boost_container_hash
1313
/boost/core//boost_core
1414
/boost/integer//boost_integer
15-
/boost/iterator//boost_iterator
1615
/boost/move//boost_move
17-
/boost/mpl//boost_mpl
16+
/boost/mp11//boost_mp11
1817
/boost/preprocessor//boost_preprocessor
1918
/boost/smart_ptr//boost_smart_ptr
2019
/boost/static_assert//boost_static_assert

doc/compiler_specifics.html

Lines changed: 7 additions & 148 deletions
Large diffs are not rendered by default.

doc/reference/indices.html

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ <h2>
212212

213213
<span class=keyword>namespace</span> <span class=identifier>multi_index</span><span class=special>{</span>
214214

215-
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T0</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Tn</span><span class=special>&gt;</span>
215+
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T</span><span class=special>,</span><span class=keyword>typename</span><span class=special>...</span> <span class=identifier>Ts</span><span class=special>&gt;</span>
216216
<span class=keyword>struct</span> <span class=identifier>indexed_by</span><span class=special>;</span>
217217

218218
<span class=special>}</span> <span class=comment>// namespace boost::multi_index</span>
@@ -223,24 +223,19 @@ <h2>
223223
<h3><a name="indexed_by">Class template <code>indexed_by</code></a></h3>
224224

225225
<p>
226-
<code>indexed_by</code> is a model of
227-
<a href="../../../../libs/mpl/doc/refmanual/random-access-sequence.html">
228-
<code>MPL Random Access Sequence</code></a> and
229-
<a href="../../../../libs/mpl/doc/refmanual/extensible-sequence.html">
230-
<code>MPL Extensible Sequence</code></a> meant to be used to specify a
226+
<code>indexed_by</code> is meant to be used to specify a
231227
compile-time list of indices as the <code>IndexSpecifierList</code> of
232228
<code>multi_index_container</code>.
233229
</p>
234230

235231
<blockquote><pre>
236-
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T0</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Tn</span><span class=special>&gt;</span>
232+
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T</span><span class=special>,</span><span class=keyword>typename</span><span class=special>...</span> <span class=identifier>Ts</span><span class=special>&gt;</span>
237233
<span class=keyword>struct</span> <span class=identifier>indexed_by</span><span class=special>;</span>
238234
</pre></blockquote>
239235

240236
<p>
241237
Each user-provided element of <code>indexed_list</code> must be an index
242-
specifier. At least an element must be provided. The maximum number of elements
243-
of an <code>indexed_by</code> sequence is implementation defined.
238+
specifier. At least an element must be provided.
244239
</p>
245240

246241
<h2><a name="tags">Tags</a></h2>
@@ -264,7 +259,7 @@ <h2>
264259

265260
<span class=keyword>namespace</span> <span class=identifier>multi_index</span><span class=special>{</span>
266261

267-
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T0</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Tn</span><span class=special>&gt;</span>
262+
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span><span class=special>...</span> <span class=identifier>Ts</span><span class=special>&gt;</span>
268263
<span class=keyword>struct</span> <span class=identifier>tag</span><span class=special>;</span>
269264

270265
<span class=special>}</span> <span class=comment>// namespace boost::multi_index</span>
@@ -280,25 +275,13 @@ <h3><a name="tag">Class template <code>tag</code></a></h3>
280275
</p>
281276

282277
<blockquote><pre>
283-
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>T0</span><span class=special>,...,</span><span class=keyword>typename</span> <span class=identifier>Tn</span><span class=special>&gt;</span>
284-
<span class=keyword>struct</span> <span class=identifier>tag</span>
285-
<span class=special>{</span>
286-
<span class=keyword>typedef</span> <b>implementation defined</b> <span class=identifier>type</span><span class=special>;</span>
287-
<span class=special>};</span>
278+
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span><span class=special>...</span> <span class=identifier>Ts</span><span class=special>&gt;</span>
279+
<span class=keyword>struct</span> <span class=identifier>tag</span><span class=special>;</span>
288280
</pre></blockquote>
289281

290282
<p>
291283
Elements of <code>tag</code> can be any type, though the user is expected
292284
to provide classes with mnemonic names. Duplicate elements are not allowed.
293-
The maximum number of elements of a <code>tag</code> instantiation is
294-
implementation defined.
295-
The nested
296-
<code>type</code> is a model of
297-
<a href="../../../../libs/mpl/doc/refmanual/random-access-sequence.html">
298-
<code>MPL Random Access Sequence</code></a> and
299-
<a href="../../../../libs/mpl/doc/refmanual/extensible-sequence.html">
300-
<code>MPL Extensible Sequence</code></a> containing the types <code>T0</code>, ... ,
301-
<code>Tn</code> in the same order as specified.
302285
</p>
303286

304287
<h2><a name="index_catalog">Indices provided by Boost.MultiIndex</a></h2>
@@ -386,9 +369,9 @@ <h2><a name="views">Index views</a></h2>
386369

387370
<br>
388371

389-
<p>Revised January 9th 2020</p>
372+
<p>Revised October 25th 2025</p>
390373

391-
<p>&copy; Copyright 2003-2020 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
374+
<p>&copy; Copyright 2003-2025 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
392375
Distributed under the Boost Software
393376
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
394377
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

doc/reference/multi_index_container.html

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,8 @@ <h3><a name="multi_index_container">
235235
<p>
236236
A <code>multi_index_container</code> type is instantiated with the type of the
237237
elements contained and a non-empty
238-
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
239-
<code>MPL Forward Sequence</code></a> specifying which indices conform the
240-
class.
238+
<a href="../../../../libs/mp11/doc/html/mp11.html#definitions">Mp11 list</a>
239+
specifying which indices conform the class.
241240
</p>
242241

243242
<p>
@@ -531,13 +530,10 @@ <h4><a name="instantiation_types">Instantiation types</a></h4>
531530
</li>
532531
<li><code>IndexSpecifierList</code> specifies the indices that the
533532
<code>multi_index_container</code> is composed of. It must be a non-empty
534-
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
535-
<code>MPL Forward Sequence</code></a> (and, preferably,
536-
an <a href="../../../../libs/mpl/doc/refmanual/random-access-sequence.html">
537-
<code>MPL Random Access Sequence</code></a>) of index specifiers. For
538-
syntactic convenience, the
533+
<a href="../../../../libs/mp11/doc/html/mp11.html#definitions">Mp11 list</a>
534+
of index specifiers. For syntactic convenience, the
539535
<a href="indices.html#indexed_by"><code>indexed_by</code></a>
540-
MPL sequence can be used.
536+
construct can be used.
541537
</li>
542538
<li><code>Allocator</code> must be an allocator of <code>Value</code> objects
543539
satisfying the associated C++ requirements at <b>[allocator.requirements]</b>.
@@ -598,34 +594,25 @@ <h4><a name="types">Nested types</a></h4>
598594
<code>index_type_list</code>
599595

600596
<blockquote>
601-
Model of
602-
<a href="../../../../libs/mpl/doc/refmanual/random-access-sequence.html">
603-
<code>MPL Random Access Sequence</code></a> and
604-
<a href="../../../../libs/mpl/doc/refmanual/extensible-sequence.html">
605-
<code>MPL Extensible Sequence</code></a> containing the types of the indices held by
597+
<a href="../../../../libs/mp11/doc/html/mp11.html#definitions">Mp11 list</a>
598+
containing the types of the indices held by
606599
the <code>multi_index_container</code>, in the same order as they were specified.
607600
</blockquote>
608601

609602
<code>iterator_type_list</code>
610603

611604
<blockquote>
612-
Model of
613-
<a href="../../../../libs/mpl/doc/refmanual/random-access-sequence.html">
614-
<code>MPL Random Access Sequence</code></a> and
615-
<a href="../../../../libs/mpl/doc/refmanual/extensible-sequence.html">
616-
<code>MPL Extensible Sequence</code></a> containing the types of the iterators of
605+
<a href="../../../../libs/mp11/doc/html/mp11.html#definitions">Mp11 list</a>
606+
containing the types of the iterators of
617607
the indices held by the <code>multi_index_container</code>, in the same order as they were
618608
specified.
619609
</blockquote>
620610

621611
<code>const_iterator_type_list</code>
622612

623613
<blockquote>
624-
Model of
625-
<a href="../../../../libs/mpl/doc/refmanual/random-access-sequence.html">
626-
<code>MPL Random Access Sequence</code></a> and
627-
<a href="../../../../libs/mpl/doc/refmanual/extensible-sequence.html">
628-
<code>MPL Extensible Sequence</code></a> containing the types of the constant
614+
<a href="../../../../libs/mp11/doc/html/mp11.html#definitions">Mp11 list</a>
615+
containing the types of the constant
629616
iterators of the indices held by the <code>multi_index_container</code>, in the same order
630617
as they were specified.
631618
</blockquote>
@@ -1082,9 +1069,9 @@ <h4><a name="serialization">Serialization</a></h4>
10821069

10831070
<br>
10841071

1085-
<p>Revised August 15th 2022</p>
1072+
<p>Revised October 25th 2025</p>
10861073

1087-
<p>&copy; Copyright 2003-2022 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
1074+
<p>&copy; Copyright 2003-2025 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
10881075
Distributed under the Boost Software
10891076
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
10901077
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

doc/release_notes.html

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ <h1><img src="../../../boost.png" alt="boost.png (6897 bytes)" align=
3030
<h2>Contents</h2>
3131

3232
<ul>
33+
<li><a href="#boost_1_91">Boost 1.91 release</a></li>
3334
<li><a href="#boost_1_85">Boost 1.85 release</a></li>
3435
<li><a href="#boost_1_84">Boost 1.84 release</a></li>
3536
<li><a href="#boost_1_83">Boost 1.83 release</a></li>
@@ -72,6 +73,26 @@ <h2>Contents</h2>
7273
<li><a href="#boost_1_33">Boost 1.33 release</a></li>
7374
</ul>
7475

76+
<h2><a name="boost_1_91">Boost 1.91 release</a></h2>
77+
78+
<p>
79+
<ul>
80+
<li><b>Breaking change:</b> All type lists accepted or provided by the library (<code>indexed_by</code>,
81+
<code>tag</code>, nested typedefs <code>index_specifier_type_list</code>,
82+
<code>index_type_list</code>, <code>iterator_type_list</code> and
83+
<code>const_iterator_type_list</code>) are no longer based on
84+
<a href="../../mpl">Boost.MPL</a> but instead they are now
85+
<a href="../../mp11/doc/html/mp11.html#definitions">Boost.Mp11 lists</a>.
86+
As a result, Boost.MultiIndex doesn't depend anymore on Boost.MPL.
87+
It is expected that most user code won't be impacted by this
88+
change, but the previous behavior may be restored, however, by
89+
globally defining the macro
90+
<code>BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT</code>.
91+
Legacy support for Boost.MPL may be eventually deprecated and removed in the future.
92+
</li>
93+
</ul>
94+
</p>
95+
7596
<h2><a name="boost_1_85">Boost 1.85 release</a></h2>
7697

7798
<p>
@@ -815,9 +836,9 @@ <h2><a name="boost_1_33">Boost 1.33 release</a></h2>
815836

816837
<br>
817838

818-
<p>Revised March 15th 2024</p>
839+
<p>Revised October 25th 2025</p>
819840

820-
<p>&copy; Copyright 2003-2024 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
841+
<p>&copy; Copyright 2003-2025 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
821842
Distributed under the Boost Software
822843
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
823844
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

doc/tests.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ <h1><img src="../../../boost.png" alt="boost.png (6897 bytes)" align=
101101
</tr>
102102
<tr class="odd_tr">
103103
<td><a href="../test/test_mpl_ops.cpp"><code>test_mpl_ops.cpp</code></a></td>
104-
<td>Metaprogramming manipulations of <code>multi_index_container</code> types.</td>
104+
<td>Boost.MPL interoperability (when <code> BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT</code> is enabled).</td>
105105
</tr>
106106
<tr>
107107
<td><a href="../test/test_node_handling.cpp"><code>test_node_handling.cpp</code></a></td>
@@ -166,9 +166,9 @@ <h1><img src="../../../boost.png" alt="boost.png (6897 bytes)" align=
166166

167167
<br>
168168

169-
<p>Revised May 9th 2020</p>
169+
<p>Revised October 26th 2025</p>
170170

171-
<p>&copy; Copyright 2003-2020 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
171+
<p>&copy; Copyright 2003-2025 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
172172
Distributed under the Boost Software
173173
License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
174174
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">

0 commit comments

Comments
 (0)