static if - unexpected results
DLearner
bmqazwsx123 at gmail.com
Fri Jun 23 18:39:56 UTC 2023
On Friday, 23 June 2023 at 16:51:16 UTC, Ali Çehreli wrote:
> On 6/23/23 07:22, DLearner wrote:
>
> > `} else static if (__traits(isPOD, typeof(` ~ VarName
> ~ `))) {` ~
>
> Regardless, you can also use the 'is' expression with the
> 'struct' keyword. If T is a struct,
>
> is (T == struct)
>
> that will produce true at compile time.
>
> Ali
Thanks for this - I can confirm it works.
More information about the Digitalmars-d-learn
mailing list