summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cstack.h
AgeCommit message (Collapse)Author
2022-04-21Switched to use i_key as primary template type parameter for all containers. ↵Tyge Løvset
Only maps will actually use i_val. Users can still specify i_val for non-maps, so there are no usability changes, other than the option to use i_key always, which makes the implementation and switching between container types simpler.
2022-04-20Support for cloning containers with carc and cbox.Tyge Lovset
Disabled emplace methods for containers with carc and cbox.
2022-04-16Added at_mut() to some containers. Added put_r() to cmap, csmap as alias for ↵Tyge Løvset
emplace_or_assign().
2022-04-15Internal.Tyge Løvset
2022-04-15Adding comment to #endif's.Tyge Løvset
2022-04-15Updated README.md docs on template args! Reverted to put() as alias for ↵Tyge Løvset
insert_or_assign() for maps. Reverted/added push_back()/emplace_back()/pop_back() to cstack.
2022-04-10Parenthesized args in calls to i_keyfrom(c), i_keyto(p) i_valfrom(c), ↵Tyge Løvset
i_valto(p), and i_keydrop(p) - can be defined as macro without parenthesized args.
2022-04-09- Switched from .._put() to .._push() as the "generic" method to add ↵Tyge Løvset
element to any container. - Changed clist_X_insert()/emplace() to clist_X_insert_at()/emplace_at() to make it consistent with cvec/cdeq. - Updated documentation.
2022-04-09Universally added a put() function to all containers.Tyge Løvset
2022-04-07Partly reverted (auto defined _i_no_emplace): emplace functions only ↵Tyge Løvset
available when either i_valraw or i_keyraw was defined. Avoids potensial bugs.
2022-04-02Internal refactoring/macro rename.Tyge Lovset
2022-04-01Simplified internal logic on enabling default cloningTyge Løvset
2022-01-03Bump to 2022.Tyge Løvset
2022-01-02Simplified and improved linkage configuration. Reorganized crandom.h a bit.Tyge Løvset
May define "i_opt c_shared", or "i_opt c_static" to specify individual container linkage, based on if STC_HEADER is defined, i.e static linkage is default, STC_HEADER defined makes shared symbols default.
2021-12-31Added alias functions push_back and pop_back to cstack + docs update.Tyge Løvset
2021-12-23Removed emplace functions if not i_valraw or i_keyraw is defined. ↵Tyge Løvset
Safety/optimize measure.
2021-12-22Renamed '_rawvalue\b' to '_raw'Tyge Løvset
2021-12-20Some small addition to constness in API. Updated docs.Tyge Løvset
2021-12-19First commit for Version 3 of STC. Main changes are consistent rename of ↵Tyge Løvset
'_del' to '_drop' and '_compare' to '_cmp'. Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind.
2021-12-02Breaking changes for i_fwd and i_cmp_none:Tyge Løvset
- Removed: i_cmp_none and i_fwd (replaced by c_no_compare and c_is_fwd args to i_opt). - Added compile-time disabling of clonable and comparable container elements, controlled by i_opt (c_no_clone | c_no_compare) - Added i_opt: can define multiple compile-time options: c_no_compare, c_no_clone, c_no_atomic, c_is_fwd: may be combined with | separator. - Except for csptr, when i_del / i_valdel / i_keydel is defined, also i_from / i_keyfrom / i_valfrom must be defined or i_opt c_no_clone. - For struct elements, either i_cmp must be defined (as before), or define i_opt c_no_compare for non-associative containers.
2021-11-21Changed reverse() and resize() to return false if mem alloc failed.Tyge Løvset
2021-10-29renamed _cx_..._t to _cx_...Tyge Løvset
2021-10-29renamed cx_..._t to _cx_..._t, and Self to _cx_selfTyge Løvset
2021-10-23Fixed bug in c_realloc() call ion cstack. Added assert in cmap_X_at(). Added ↵Tyge Løvset
a c++ example.
2021-10-13Maintenance update. template.h now includes cstr.h when i_key_str or ↵Tyge Løvset
i_val_str is defined. Minor optimizations.
2021-10-06Some while to for changed. Return value for cstack_X_push/emplace. Docs updated.Tyge Løvset
2021-09-26Added some extensions to cstack and cpque. cstack can now be used as a ↵Tyge Løvset
vector-lite.
2021-09-23Cleanup: Replaced c_emplace() macro with more general ↵Tyge Løvset
c_apply()/c_apply_pair() macros, and removed c_var() macro. Removed CX_emplace_items() member functions in containers used by c_emplace().
2021-09-21Added copy(self, other) function to all containers. Fixed some docs.Tyge Løvset
2021-09-14Fixed include structuring.Tyge Løvset
2021-09-12Renamed input macro i_module to i_prefix. Replaced astar.c example.Tyge Løvset
Now supports that user defines i_prefix.
2021-09-10Added support for cqueue.h Added test.Tyge Løvset
2021-09-08Some docs on main page. Added emplace_items to cstack.Tyge Løvset
2021-09-08Updated most examples to newstyle. Some changes in cpque/cstack.Tyge Løvset
2021-09-08Improved undocumented iterator method names: fwd, adv => advance, idx => index.Tyge Løvset
2021-09-08Added init_with_capacity().Tyge Løvset
2021-09-08Made clone more robust in cstack, cpqueTyge Løvset
2021-09-08Updated cpque and cstack.Tyge Løvset
2021-09-07Added cstack and cpque (priority queue) + test.Tyge Løvset
2021-09-05New usage style. only cvec is functional. see vec_test_new.cTyge Løvset
2021-05-24Split c_fordefer() into c_forvar() and c_fordefer() macros.Tyge Løvset
2021-05-24Renamed c_with => c_fordefer, and removed c_withvar. Macros were too ↵Tyge Løvset
deceiving and hid the fact that it was for-loops. Now it is more explicit.
2021-05-20Moved stc folder into include folder.Tyge Løvset