diff options
| author | Tyge Løvset <[email protected]> | 2022-03-15 00:17:08 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-03-15 00:17:08 +0100 |
| commit | 342484f70998258022c26e6af2926ecc7635bbdd (patch) | |
| tree | 2055e6fd1adc1a0f61c1456e8e79f021838ab583 /README.md | |
| parent | 9f1a51593ae7dd45db46f39ac18901ad175af18e (diff) | |
| download | STC-modified-342484f70998258022c26e6af2926ecc7635bbdd.tar.gz STC-modified-342484f70998258022c26e6af2926ecc7635bbdd.zip | |
Some docs update, ++.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -25,14 +25,14 @@ Note that STC does not use long macro expansions anymore, but relies on one or m which by the compiler is seen as different code because of macro name substitutions. - [***ccommon*** - RAII and iterator macros](docs/ccommon_api.md) -- [***carr2, carr3*** - **2d** and **3d** dynamic **array** type](docs/carray_api.md) +- [***carc*** - **std::shared_ptr** alike support](docs/carc_api.md) +- [***carr2/3 - **2d** and **3d** dynamic **array** type](docs/carray_api.md) - [***cbits*** - **std::bitset** alike type](docs/cbits_api.md) - [***cbox*** - **std::unique_ptr** alike type](docs/cbox_api.md) - [***cdeq*** - **std::deque** alike type](docs/cdeq_api.md) - [***clist*** - **std::forward_list** alike type](docs/clist_api.md) - [***cmap*** - **std::unordered_map** alike type](docs/cmap_api.md) - [***cpque*** - **std::priority_queue** alike type](docs/cpque_api.md) -- [***carc*** - **std::shared_ptr** alike support](docs/carc_api.md) - [***cqueue*** - **std::queue** alike type](docs/cqueue_api.md) - [***cset*** - **std::unordered_set** alike type](docs/cset_api.md) - [***csmap*** - **std::map** sorted map alike type](docs/csmap_api.md) @@ -94,10 +94,11 @@ int main(void) { FVec_drop(&vec); // free memory } ``` -However, a "better" way to write the same is: +A "better" way to write the same code is: ```c int main(void) { - c_auto (FVec, vec) { // RAII + c_auto (FVec, vec) // RAII - create and destroy vec + { c_apply(v, FVec_push_back(&vec, v), float, {10.f, 20.f, 30.f}); c_foreach (i, FVec, vec) // generic iteration and element access |
