diff --git a/doc/tutorial/basics.html b/doc/tutorial/basics.html index f05d421..6da5308 100644 --- a/doc/tutorial/basics.html +++ b/doc/tutorial/basics.html @@ -474,6 +474,18 @@ means of user-defined typedefs: es.get<1>().find("Judy Smith"); +

+The iterators provided by every index are constant, that is, the elements they point to +cannot be mutated directly. This follows the interface of std::set for ordered +indices but might come as a surprise for other types such as sequenced indices, which are modeled after +std::list, where this limitation does not happen. This seemingly odd behavior +is imposed by the way multi_index_containers work; if elements were +allowed to be mutated indiscriminately, we could introduce inconsistencies +in the ordered indices of the multi_index_container without the container +being notified about it. Element modification is properly done by means of +update operations on any index. +

+

Index types

@@ -1060,9 +1072,8 @@ same way as std::list permits. The interface of sequenced indices is thus designed upon that of std::list; nearly every operation provided in the standard container is replicated here, occasionally with changes in the syntax and/or semantics to cope with the constraints imposed by -Boost.MultiIndex. In particular, there is an important limitation of sequenced -indices with respect to std::lists, namely that elements of an -multi_index_container are not mutable through an iterator: +Boost.MultiIndex. An important difference, commented above, +is the fact that sequenced index iterators are constant:

@@ -1076,11 +1087,7 @@ indices with respect to std::lists, namely that elements of an
 

-That is, iterators of a sequenced index (of all types of indices, actually) -point to constant elements. This limitation might come as a surprise, but -it is imposed by the way multi_index_containers work; if elements were -allowed to be changed in this manner, we could introduce inconsistencies -in other ordered indices of the multi_index_container. Element modification +As with any other type of index, element modification can nevertheless be done by means of update operations.

@@ -1240,9 +1247,9 @@ Index types
-

Revised November 7th 2008

+

Revised November 11th 2014

-

© Copyright 2003-2008 Joaquín M López Muñoz. +

© Copyright 2003-2014 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at