mirror of
https://github.com/boostorg/multi_index.git
synced 2026-07-21 13:23:43 +00:00
Compare commits
4 Commits
master
...
boost-1.32.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 00a4d8875f | |||
| bc743ef2f0 | |||
| d3644ca1d6 | |||
| e35137171d |
@@ -1193,7 +1193,7 @@ definition of the <code>multi_index_container</code>:
|
||||
<li><code>iterator_type_list</code>,</li>
|
||||
<li><code>const_iterator_type_list</code>.</li>
|
||||
</ul>
|
||||
Each of these types is a <a href="../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
Each of these types is a <a href="../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> with as many elements as indices
|
||||
comprise the <code>multi_index_container</code>: for instance, the <code>n</code>-nth
|
||||
element of <code>iterator_type_list</code> is the same as
|
||||
|
||||
@@ -210,7 +210,7 @@ index specifiers
|
||||
|
||||
<p>
|
||||
<code>indexed_by</code> is a
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> meant to be used to specify a
|
||||
compile-time list of indices as the <code>IndexSpecifierList</code> of
|
||||
<code>multi_index_container</code>.
|
||||
|
||||
@@ -223,7 +223,7 @@ and for access to the indices held.
|
||||
<p>
|
||||
A <code>multi_index_container</code> type is instantiated with the type of the
|
||||
elements contained and a non-empty
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> specifying which indices conform the
|
||||
class.
|
||||
</p>
|
||||
@@ -491,7 +491,7 @@ scheme outlined in the
|
||||
type of the elements contained.</li>
|
||||
<li><code>IndexSpecifierList</code> specifies the indices that the
|
||||
<code>multi_index_container</code> is composed of. It must be a non-empty
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> of index specifiers. For
|
||||
syntactic convenience, the
|
||||
<a href="indices.html#indexed_by"><code>indexed_by</code></a>
|
||||
@@ -529,7 +529,7 @@ involved are default constructible.
|
||||
<code>index_specifier_type_list</code>
|
||||
|
||||
<blockquote>
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> containing the types of the index specifiers
|
||||
used in the instantiation of the <code>multi_index_container</code>, in the same order as
|
||||
they were provided.
|
||||
@@ -538,7 +538,7 @@ they were provided.
|
||||
<code>index_type_list</code>
|
||||
|
||||
<blockquote>
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> containing the types of the indices held by
|
||||
the <code>multi_index_container</code>, in the same order as they were specified.
|
||||
</blockquote>
|
||||
@@ -546,7 +546,7 @@ the <code>multi_index_container</code>, in the same order as they were specified
|
||||
<code>iterator_type_list</code>
|
||||
|
||||
<blockquote>
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> containing the types of the iterators of
|
||||
the indices held by the <code>multi_index_container</code>, in the same order as they were
|
||||
specified.
|
||||
@@ -555,7 +555,7 @@ specified.
|
||||
<code>const_iterator_type_list</code>
|
||||
|
||||
<blockquote>
|
||||
<a href="../../../../libs/mpl/doc/ref/Forward_Sequence.html">
|
||||
<a href="../../../../libs/mpl/doc/refmanual/forward-sequence.html">
|
||||
<code>MPL Forward Sequence</code></a> containing the types of the constant
|
||||
iterators of the indices held by the <code>multi_index_container</code>, in the same order
|
||||
as they were specified.
|
||||
|
||||
@@ -335,26 +335,26 @@ struct ordered_index_node_impl
|
||||
ordered_index_node_impl* x,ordered_index_node_impl* prior,
|
||||
ordered_index_node_impl* next,ordered_index_node_impl* header)
|
||||
{
|
||||
if(next==header){
|
||||
header->parent()=x;
|
||||
header->left()=x;
|
||||
header->right()=x;
|
||||
x->parent()=header;
|
||||
}
|
||||
else if(next->left()==0){
|
||||
if(next->left()==0){
|
||||
next->left()=x;
|
||||
x->parent()=next;
|
||||
if(next==header->left()){
|
||||
header->left()=x; /* maintain leftmost pointing to min node */
|
||||
}
|
||||
}
|
||||
else{ /* prior->right() must be null */
|
||||
else if(x!=prior){ /* prior->right() must be null */
|
||||
prior->right()=x;
|
||||
x->parent()=prior;
|
||||
if(prior==header->right()){
|
||||
header->right()=x; /* maintain rightmost pointing to max node */
|
||||
}
|
||||
}
|
||||
else{
|
||||
header->parent()=x;
|
||||
header->left()=x;
|
||||
header->right()=x;
|
||||
x->parent()=header;
|
||||
}
|
||||
x->left()=0;
|
||||
x->right()=0;
|
||||
rebalance(x,header->parent());
|
||||
|
||||
@@ -57,6 +57,10 @@ void test_update()
|
||||
BOOST_CHECK(!iii.replace(iii.begin(),pair_of_ints(0,5)));
|
||||
BOOST_CHECK(!iis.replace(iis.begin(),pair_of_ints(5,11)));
|
||||
BOOST_CHECK(!iis.replace(iis.begin(),pair_of_ints(11,5)));
|
||||
BOOST_CHECK(!iis.replace(++iis.begin(),pair_of_ints(10,5)));
|
||||
BOOST_CHECK(!iis.replace(++iis.begin(),pair_of_ints(5,10)));
|
||||
BOOST_CHECK(!iis.replace(--iis.end(),pair_of_ints(5,10)));
|
||||
BOOST_CHECK(!iii.replace(--iii.end(),pair_of_ints(10,5)));
|
||||
|
||||
BOOST_CHECK(iis.modify(iis.begin(),increment_first));
|
||||
BOOST_CHECK(iii.modify(iii.begin(),increment_first));
|
||||
|
||||
Reference in New Issue
Block a user