static if - unexpected results

Ali Çehreli acehreli at yahoo.com
Fri Jun 23 16:51:16 UTC 2023


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



More information about the Digitalmars-d-learn mailing list