Is there any performance penalty for static if?
    Ferhat Kurtulmuş 
    aferust at gmail.com
       
    Thu May 16 10:19:03 UTC 2019
    
    
  
On Thursday, 16 May 2019 at 00:18:25 UTC, user1234 wrote:
> On Wednesday, 15 May 2019 at 22:03:39 UTC, Ferhat Kurtulmuş 
> wrote:
>> [...]
>
> You've been given the answer but about this particular piece of 
> code, rather use the "is" expression
>
>   static if (is(T == float)) {}
>   else static if (is(T == double)) {}
>
> etc.
Yes, it is now much better. Thank you.
    
    
More information about the Digitalmars-d-learn
mailing list