On Saturday, 24 July 2021 at 18:10:07 UTC, Alexey wrote:
I've tried to use ```typeof(t) is cast(t)null```, but compiler exits with error and so this can't be used for checking this issue.

The goal I with to achieve by this check - is to use template and to assign value to variable basing on it's ability to accept null as a value.


currently I ended up using ```__traits(compiles, cast(T1)null)``` for this check. but don't know is this really semantically correct.


Reply via email to