ucx/cx/iterator.h

changeset 31
287484519844
parent 22
112b85020dc9
--- a/ucx/cx/iterator.h	Fri Dec 12 10:42:53 2025 +0100
+++ b/ucx/cx/iterator.h	Fri Dec 19 17:22:03 2025 +0100
@@ -214,26 +214,15 @@
  * use cxIteratorPtr() to create an iterator which directly
  * yields the stored pointers.
  *
- * While the iterator is in use, the array may only be altered by removing
- * elements through #cxIteratorFlagRemoval(). Every other change to the array
- * will bring this iterator to an undefined state.
- *
- * When @p remove_keeps_order is set to @c false, removing an element will only
- * move the last element to the position of the removed element, instead of
- * moving all subsequent elements by one. Usually, when the order of elements is
- * not important, this parameter should be set to @c false.
- *
  * @param array a pointer to the array (can be @c NULL)
  * @param elem_size the size of one array element
  * @param elem_count the number of elements in the array
- * @param remove_keeps_order @c true if the order of elements must be preserved
- * when removing an element
  * @return an iterator for the specified array
  * @see cxIteratorPtr()
  */
 cx_attr_nodiscard
 CX_EXPORT CxIterator cxIterator(const void *array,
-        size_t elem_size, size_t elem_count, bool remove_keeps_order);
+        size_t elem_size, size_t elem_count);
 
 /**
  * Creates an iterator for the specified plain pointer array.
@@ -243,25 +232,13 @@
  * hand, an iterator created with cxIterator() would return the
  * addresses of those pointers within the array).
  *
- * While the iterator is in use, the array may only be altered by removing
- * elements through #cxIteratorFlagRemoval(). Every other change to the array
- * will bring this iterator to an undefined state.
- *
- * When @p remove_keeps_order is set to @c false, removing an element will only
- * move the last element to the position of the removed element, instead of
- * moving all subsequent elements by one. Usually, when the order of elements is
- * not important, this parameter should be set to @c false.
- *
  * @param array a pointer to the array (can be @c NULL)
  * @param elem_count the number of elements in the array
- * @param remove_keeps_order @c true if the order of elements must be preserved
- * when removing an element
  * @return an iterator for the specified array
  * @see cxIterator()
  */
 cx_attr_nodiscard
-CX_EXPORT CxIterator cxIteratorPtr(const void *array, size_t elem_count,
-        bool remove_keeps_order);
+CX_EXPORT CxIterator cxIteratorPtr(const void *array, size_t elem_count);
 
 #ifdef __cplusplus
 } // extern "C"

mercurial