summaryrefslogtreecommitdiffhomepage
path: root/docs/cmap_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-06-01 10:33:00 +0200
committerTyge Løvset <[email protected]>2022-06-01 10:33:00 +0200
commitd7a19420e0aec71a2a840f68a54549c8a951f929 (patch)
treed804c815661c4e5ae9c2a67eeed85cfe0b819b55 /docs/cmap_api.md
parentc25b6d39f4ebbc1785108fd248b67fe9e8c95e92 (diff)
downloadSTC-modified-d7a19420e0aec71a2a840f68a54549c8a951f929.tar.gz
STC-modified-d7a19420e0aec71a2a840f68a54549c8a951f929.zip
Update docs regarding i_implement for cstr, cview, cbits, ...
Diffstat (limited to 'docs/cmap_api.md')
-rw-r--r--docs/cmap_api.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 58d33534..b30353ef 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -113,6 +113,7 @@ bool c_memcmp_eq(const i_keyraw* a, const i_keyraw* b); /
## Examples
```c
+#define i_implement
#include <stc/cstr.h>
#define i_key_str
@@ -157,6 +158,7 @@ The HEX of color BLACK is:[#000000]
### Example 2
This example uses a cmap with cstr as mapped value.
```c
+#define i_implement
#include <stc/cstr.h>
#define i_key int
@@ -265,6 +267,7 @@ Output:
### Example 5
Advanced 1: Key type is struct.
```c
+#define i_implement
#include <stc/cstr.h>
typedef struct {
@@ -341,6 +344,7 @@ Advanced 2: In example 5 we needed to construct a lookup key which allocated str
In this example we use rawtype feature to make it even simpler to use. Note that we must use the emplace() methods
to add "raw" type entries (otherwise compile error):
```c
+#define i_implement
#include <stc/cstr.h>
typedef struct Viking {