diff options
| author | gingerBill <bill@gingerbill.org> | 2021-10-31 19:39:01 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-10-31 19:39:01 +0000 |
| commit | 141299eb02bc9a7330daa30d75d279e84ba28cc3 (patch) | |
| tree | b0c429d86cb6f96db2ae0f6a012ed0d979835e83 /src/bug_report.cpp | |
| parent | efe05b3e1382d569201709a1d1c5f39878516a0f (diff) | |
Change the behaviour change is for when a `bit_set` of range/enum and the underlying type has been specified
* If the lower bound is greater than zero, it will become zero (thus removing the compatification)
* If the lower bound is negative, it is an error
This means that an integer value N, maps directly to the N-th bit.
Example
```
foo :: enum u8 {
a = 2,
b = 3,
c = 4,
}
set0: bit_set[foo]
set0 += {.a, .b}
// internally set0 == 1<<(2-2) | 1<<(3-2)
set1: bit_set[foo; u32]
set1 += {.a, .b}
// internally set1 == 1<<(2-0) | 1<<(3-0)
```
Diffstat (limited to 'src/bug_report.cpp')
0 files changed, 0 insertions, 0 deletions