diff options
| author | Tyge Løvset <[email protected]> | 2023-01-15 21:18:39 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-15 21:18:39 +0100 |
| commit | 770a39ff6ed39494569a411949f22edcdb7eb30c (patch) | |
| tree | ddc38f64ed90eceff9571c1c2753b4425947629e /include/stc/algo/crange.h | |
| parent | c5e071c622d6f460aa1ad07b6543ceaaed5209fc (diff) | |
| download | STC-modified-770a39ff6ed39494569a411949f22edcdb7eb30c.tar.gz STC-modified-770a39ff6ed39494569a411949f22edcdb7eb30c.zip | |
Large commit:
- Moved stc/algo/cspan.h to stc/cspan.h - its a data view type similar to csview. +Many updates. Added docs/cspan_api.md page!
- Update c11/fmt.h to VER 2.0: NEW API, see test. NOTE: fmt.h is not officially part of STC, as it is C11, and STC is C99.
- Renamed crange_LITERAL() back to crange_literal(), and cspan_LITERAL() to cspan_literal(). These returns a compound literal (lvalue) that can be passed to a c_FOR*-iterator.
Diffstat (limited to 'include/stc/algo/crange.h')
| -rw-r--r-- | include/stc/algo/crange.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/algo/crange.h b/include/stc/algo/crange.h index 518320b5..63242a54 100644 --- a/include/stc/algo/crange.h +++ b/include/stc/algo/crange.h @@ -34,7 +34,7 @@ int main() // use a temporary crange object. int a = 100, b = INT32_MAX; - c_FORFILTER (i, crange, crange_object(a, b, 8) + c_FORFILTER (i, crange, crange_literal(a, b, 8) , i.index > 10 , c_FLT_TAKE(i, 3)) printf(" %lld", *i.ref); @@ -46,7 +46,7 @@ int main() #include <stc/ccommon.h> -#define crange_object(...) \ +#define crange_literal(...) \ (*(crange[]){crange_make(__VA_ARGS__)}) typedef long long crange_value; |
