www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: std.metastrings.ToString! problems

reply asd <x x.com> writes:
 n < 0L is not constant or does not evaluate to a bool
 (D2, OS X)
 

a template with runtime variables.

that includes "runtime variables" used in CTFE (this is because CTFE functions are also normal runtime functions).

In this case value of n is possible to know at compile time - it depends only on compile-time input. I'm not going to use this function at run time. Too bad I can't declare that :(
Jul 24 2009
parent Ary Borenszweig <ary esperanto.org.ar> writes:
asd wrote:
 n < 0L is not constant or does not evaluate to a bool
 (D2, OS X)

a template with runtime variables.

are also normal runtime functions).

In this case value of n is possible to know at compile time - it depends only on compile-time input. I'm not going to use this function at run time. Too bad I can't declare that :(

So write: const int n = 0;
Jul 24 2009