mixin does not work as expected
donalexinder24
donalexinder24 at gmail.com
Mon Jan 10 14:43:02 UTC 2022
On Wednesday, 5 January 2022 at 09:33:07 UTC, vit wrote:
> On Wednesday, 5 January 2022 at 09:17:54 UTC, rempas wrote:
>> [...]
>
> 1) That printed code on standard output is wrong, missing
> declaration for is_same and i8.
>
> 2) if-else must be in same mixin:
> ```d
> mixin(""
> + type_check!("static if", "i8", "true", "5", "4",
> "10", "5")
> + type_check!("else static if", "i16", "true", "7",
> "6", "18", "8")
> + type_check!("else static if", "i32", "true", "12", "10",
> "34", "13")
> + type_check!("else", "i64", "true", "21", "18", "66",
> "24")
> );
> ```
>
>
> 3) last type_checkin signed and unsigned part of function test
> has else with condition.
>
> ```d
> else(is_same!(num, i64)) {
> mixin(base_digit!("21", "18", "66", "24"));
> static if (true) {
> mixin(overflow_check!"i64.min"); }
> }
> ```
hi
Thank you sincerely!
What exactly does this imply? They do, because the other is
utilized to create the 64-bit type.
More information about the Digitalmars-d-learn
mailing list