Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquintides committed Apr 13, 2018
1 parent 4d21e89 commit 9623bf0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
17 changes: 13 additions & 4 deletions doc/reference/multi_index_container.html
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ <h3><a name="multi_index_container">

<span class=comment>// construct/copy/destroy:</span>

<span class=identifier>multi_index_container</span><span class=special>();</span>
<span class=keyword>explicit</span> <span class=identifier>multi_index_container</span><span class=special>(
</span><span class=keyword>const</span> <span class=identifier>ctor_args_list</span><span class=special>&amp;</span> <span class=identifier>args_list</span><span class=special>=</span><span class=identifier>ctor_args_list</span><span class=special>(),
</span><span class=keyword>const</span> <span class=identifier>ctor_args_list</span><span class=special>&amp;</span> <span class=identifier>args_list</span><span class=special>,
</span><span class=keyword>const</span> <span class=identifier>allocator_type</span><span class=special>&amp;</span> <span class=identifier>al</span><span class=special>=</span><span class=identifier>allocator_type</span><span class=special>());</span>
<span class=keyword>explicit</span> <span class=identifier>multi_index_container</span><span class=special>(</span><span class=keyword>const</span> <span class=identifier>allocator_type</span><span class=special>&amp;</span> <span class=identifier>al</span><span class=special>);</span>
<span class=keyword>template</span><span class=special>&lt;</span><span class=keyword>typename</span> <span class=identifier>InputIterator</span><span class=special>&gt;</span>
Expand Down Expand Up @@ -671,8 +672,16 @@ <h4><a name="nested_templates">Nested class templates</a></h4>

<h4><a name="constructors">Constructors, copy and assignment</a></h4>

<code>multi_index_container();</code>

<blockquote>
<b>Effects:</b> Constructs an empty <code>multi_index_container</code> using the
default values of <code>ctor_args_list</code> and <code>allocator_type</code>.<br>
<b>Complexity:</b> Constant.
</blockquote>

<code>explicit multi_index_container(<br>
&nbsp;&nbsp;const ctor_args_list&amp; args_list=ctor_args_list(),<br>
&nbsp;&nbsp;const ctor_args_list&amp; args_list,<br>
&nbsp;&nbsp;const allocator_type&amp; al=allocator_type());</code>

<blockquote>
Expand Down Expand Up @@ -992,9 +1001,9 @@ <h4><a name="serialization">Serialization</a></h4>

<br>

<p>Revised October 12th 2013</p>
<p>Revised April 13th 2018</p>

<p>&copy; Copyright 2003-2013 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
<p>&copy; Copyright 2003-2018 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
Expand Down
6 changes: 5 additions & 1 deletion doc/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ <h2><a name="boost_1_68">Boost 1.68 release</a></h2>
(ticket <a href="https://svn.boost.org/trac10/ticket/13478">#13478</a>).
Thanks to S&eacute;bastien Paris for the report.
</li>
<li><code>multi_index_container</code>'s default constructor is no longer
<code>explicit</code>
(ticket <a href="https://svn.boost.org/trac10/ticket/13518">#13518</a>).
</li>
</ul>
</p>

Expand Down Expand Up @@ -584,7 +588,7 @@ <h2><a name="boost_1_33">Boost 1.33 release</a></h2>

<br>

<p>Revised March 13th 2018</p>
<p>Revised April 13th 2018</p>

<p>&copy; Copyright 2003-2018 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
Distributed under the Boost Software
Expand Down
17 changes: 11 additions & 6 deletions include/boost/multi_index_container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,26 @@ class multi_index_container:

/* construct/copy/destroy */

multi_index_container():
bfm_allocator(allocator_type()),
super(ctor_args_list(),bfm_allocator::member),
node_count(0)
{
BOOST_MULTI_INDEX_CHECK_INVARIANT;
}

explicit multi_index_container(
const ctor_args_list& args_list,

#if BOOST_WORKAROUND(__IBMCPP__,<=600)
/* VisualAge seems to have an ETI issue with the default values
* for arguments args_list and al.
/* VisualAge seems to have an ETI issue with the default value for
* argument al.
*/

const ctor_args_list& args_list=
typename mpl::identity<multi_index_container>::type::
ctor_args_list(),
const allocator_type& al=
typename mpl::identity<multi_index_container>::type::
allocator_type()):
#else
const ctor_args_list& args_list=ctor_args_list(),
const allocator_type& al=allocator_type()):
#endif

Expand Down
11 changes: 10 additions & 1 deletion test/test_copy_assignment.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Boost.MultiIndex test for copying and assignment.
*
* Copyright 2003-2013 Joaquin M Lopez Munoz.
* Copyright 2003-2018 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)
Expand Down Expand Up @@ -234,4 +234,13 @@ void test_copy_assignment()

holder h((holder()));
h=holder();

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
{
/* testcase for https://svn.boost.org/trac10/ticket/13518 */

multi_index_container<int> x={};
}
#endif

}

0 comments on commit 9623bf0

Please sign in to comment.