diff -r 425d4279856f -r 35f06c5eeb0e src/cx/iterator.h --- a/src/cx/iterator.h Sun May 21 11:52:58 2023 +0200 +++ b/src/cx/iterator.h Sun May 21 14:03:21 2023 +0200 @@ -51,6 +51,8 @@ /** * Returns a pointer to the current element. + * + * When valid returns false, the behavior of this function is undefined. */ __attribute__ ((__nonnull__)) void *(*current)(void const *); @@ -63,12 +65,16 @@ /** * Advances the iterator. + * + * When valid returns false, the behavior of this function is undefined. */ __attribute__ ((__nonnull__)) void (*next)(void *); /** * Flag current element for removal, if possible. + * + * When valid returns false, the behavior of this function is undefined. */ __attribute__ ((__nonnull__)) bool (*flag_removal)(void *);