From 95cef6a4bf1a6ae56e23a603a8168db8eecf8af0 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sat, 10 Apr 2021 17:09:03 +0200 Subject: Fix clist doc formatting. --- docs/clist_api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/clist_api.md b/docs/clist_api.md index 5d665c83..4660ad9c 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -11,12 +11,12 @@ The method *clist_X_count()* returns size of list, computed in **O**(*n*) time. ***Iterator invalidation***: Adding, removing and moving the elements within the list, or across several lists will invalidate other iterators currently refering to these elements and their immediate succesive elements. -However, an iterator to a succesive element can both be dereferenced and advanced. After advancing (using -*clist_X_next(&it)* or *it = cslist_X_fwd(it, n)*), the iterator is in a valid state. This implies: +However, an iterator to a succesive element can both be dereferenced and advanced. After advancing, the +iterator is in a valid state. This implies: -- `clist_X_insert(&L, clist_X_fwd(it,1), x)` is identical to *std::forward_list* L.insert_after(it, x)*. -- `clist_X_erase_at(&L, clist_X_fwd(it,1))` is identical to *std::forward_list* L.erase_after(it)*. -- Iterators returned from *clist_X_insert()* and *clist_X_erase_at()* are always valid or `end`. +- `clist_X_insert(&L, clist_X_fwd(it,1), x)` is identical to *std::forward_list* `L.insert_after(it, x)`. +- `clist_X_erase_at(&L, clist_X_fwd(it,1))` is identical to *std::forward_list* `L.erase_after(it)`. +- Iterators returned from *clist_X_insert()* and *clist_X_erase_at()* are always valid. - Elements can be safely removed from a list via multiple iterators if done back to front order. See the c++ class [std::list](https://en.cppreference.com/w/cpp/container/list) for similar API and -- cgit v1.2.3