Checking if a type is void

Stefan Koch uplink.coder at googlemail.com
Sat May 28 14:35:03 UTC 2022


On Saturday, 28 May 2022 at 14:25:57 UTC, Paul Backus wrote:
> On Saturday, 28 May 2022 at 14:20:22 UTC, Stefan Koch wrote:
>> The reason this is that internally a TypeExpression is created 
>> and all Expressions defined a `!` operation.
>> Because all of them are values/ do have init-expressions.
>
> Reminds me of this example someone posted in the community 
> Discord a while ago:
>
> ```d
> alias T = int*;
> alias U = typeof(*T);
> static assert(is(U == int));
> ```

At first I didn't see what was unexpected about that. :)
But yes that seems to have a similar cause.



More information about the Digitalmars-d mailing list