June 15, 2023 General » Re: assert and static assert and code generatio | |||
|---|---|---|---|
| |||
...doesn't use the assert to make any deductions when the assert is not compiled... | |||
June 15, 2023 General » Re: assert and static assert and code generatio | |||
|---|---|---|---|
| |||
...not identical to the test in the assert, can be removed sometimes. To test things... | |||
June 15, 2023 General » Re: assert and static assert and code generatio | |||
|---|---|---|---|
| |||
There were some big wars about this almost a decade ago. It was Walter's... | |||
June 15, 2023 General » Re: assert and static assert and code generatio | |||
|---|---|---|---|
| |||
I think the idea is more that:
```
assert(x < 100);
...
if (x < 200) {
```
And the... | |||
June 14, 2023 General » Re: assert and static assert and code generatio | |||
|---|---|---|---|
| |||
...thing that asserts can do, even if the assert is not generated into code. -Steve | |||
June 14, 2023 General » Re: assert and static assert and code generatio | |||
|---|---|---|---|
| |||
...thanks. What if I say something like assert( x < 100 ); and let’s say I’m giving... | |||
June 14, 2023 General » Re: assert and static assert and code generation | |||
|---|---|---|---|
| |||
...redundant given the assert). The compiler can use the hint of the assert whether it... | |||
June 14, 2023 Learn » Re: Union with bits ? | |||
|---|---|---|---|
| |||
...padding", 5,));
}
}
void main() {
auto m = MyStruct();
m.B = 1;
assert(m.status == 2);
}
Ali
| |||
June 14, 2023 General » assert and static assert and code generation | |||
|---|---|---|---|
| |||
...that correct? If assert without the static is implemented as debug assert then unless the... | |||
June 14, 2023 GDC » bug report x86-64 code: je / jbe | |||
|---|---|---|---|
| |||
...in {
static assert( is ( typeof( x * x ) ) );
assert( p >= 0 );
}
out ( ret ) {
assert( ( p == 0... | |||
Copyright © 1999-2021 by the D Language Foundation