stlab libraries
Modern, modular C++ algorithms and data structures. Source and issues on GitHub.
|
API
|
Concurrency
|
Forest
|
Latest Release: v2.4.0
Released: Oct 13, 2026Sources: changes | zipball | tarball
Changes:
Highlights
- Expanded coroutine support and generic
resume_onsupport for awaitables. - DLL-safe shared executor ABI and core-ABI system timers, including threadless Emscripten support.
- Execution primitives extracted into the standalone
stlab-executiondependency, consumed through CPM. - Doxygen documentation improvements and fixes for headers and
forest::child_iteratorconstruction.
Draft publication checklist
- Resolve the failed documentation-site build for the release commit: https://github.com/stlab/stlab/actions/runs/38341087303 (the deployment job was skipped).
What’s Changed
- Enhance coroutine support in
future<>and update README by @sean-parent in https://github.com/stlab/stlab/pull/592 - Implement generic
resume_onsupport for awaitables infuture<>by @sean-parent in https://github.com/stlab/stlab/pull/594 - fix: Add the missing header file by @apocelipes in https://github.com/stlab/stlab/pull/597
- Add Doxygen support and enhance documentation across the project by @sean-parent in https://github.com/stlab/stlab/pull/599
- forest: fix child_iterator constructor argument by @purpleKarrot in https://github.com/stlab/stlab/pull/595
- Add DLL-safe shared executor ABI by @sean-parent in https://github.com/stlab/stlab/pull/604
- Move system timers into core ABI and add threadless Emscripten by @sean-parent in https://github.com/stlab/stlab/pull/605
- Mark coroutine test await_ready helpers nodiscard by @sean-parent in https://github.com/stlab/stlab/pull/606
- Extract standalone stlab-execution and consume it through CPM by @sean-parent in https://github.com/stlab/stlab/pull/607
New Contributors
- @apocelipes made their first contribution in https://github.com/stlab/stlab/pull/597
- @purpleKarrot made their first contribution in https://github.com/stlab/stlab/pull/595
Full Changelog: https://github.com/stlab/stlab/compare/v2.3.0…v2.4.0
For older releases, the full list is available on GitHub.Posts
-
Forest: An Introduction
Hierarchies. Everyone uses them, so why are they difficult to maintain? In this article we explore
forest, a data structure that makes hierarchies self-maintainable, so you can go back to thinking about the data they contain. -
Small Object Optimization for Polymorphic Types
At Meeting C++ 2017 I presented a lightning talk Polymorphic Task Template in Ten which showed an easy way to implement a polymorphic task template, similar to
std::function, with a small object optimization in 10 minutes.Unfortunately, the small object optimization, as described, leads to undefined behavior. As a general rule, you cannot store an object of one type in memory and read it back as another, even if the other type is the objects base class (there are exceptions to this rule, but they do not apply to this situation).
This tip looks at the details of the issue and describes a solution which turns out to be more efficient although it does require slightly more, and more complex, code to implement. A small object optimization for polymorphic types is a very useful construct so it important to understand how it can be done correctly.
-
New Concurrency Library
A new concurrency library was added as a first one to this new stlab instance.
This library provides an alternative to the C++11/14 and upcoming C++17 TS futures. As well it provides an implementation of channels that allow the creation of process graphs.
subscribe via RSS