Something wrong with std.math.pow?

Tim Lt.Infiltrator at gmail.com
Thu Sep 27 22:47:21 PDT 2012


> import std.conv;
> import std.math;
>
> void main() {
>     pragma(msg, "Number of bits: " ~ to!string(12 * 4));
>     pragma(msg, "Addressable Bytes: " ~ to!string(pow(2, 12 * 
> 4)));
> }
>
> Number of bits: 48
> Addressable Bytes: 0

 From what I understand, pragma(msg, ...) prints at compile time.  
I don't think that it evaluates functions then.


More information about the Digitalmars-d-learn mailing list