--- Comment #3 from Don <clugd...@yahoo.com.au> 2010-03-24 11:58:27 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
> < Note that const
> > variables are NOT evaluated at compile time. But in these kind of
> > situations,
> > it should do the same thing it does with a CTFE function call.
> Then how does the first pragma work? It uses the same const variable that
> supposedly isn't evaluatable at compile time in the second pragma...
I didn't express that very clearly. Const variables are not evaluated at
instantiation. It is permitted for a const variable to be determined at
If a CTFE function call is made, all the arguments are interpreted before
calling the function. In the test case, it only becomes a compile-time value
while evaluating the pragma. (The pragma is forcing it to be a compile-time
The bug is that this constant folding is not happening in template
instantiations, static assert, static if, etc.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------