http://d.puremagic.com/issues/show_bug.cgi?id=4001


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au


--- Comment #1 from Don <clugd...@yahoo.com.au> 2010-03-24 01:28:46 PDT ---
This isn't actually a CTFE problem. The issue is that constant folding isn't
being performed on const variables with initializers. BTW in the original bug,
you can replace 'const' with 'enum' and it will work fine. 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.

Reduced test case:
----
int space() { return 4001; }

void oddity4001()
{
    const int bowie = space();    
    static assert(space() == 4001); // OK
    static assert(bowie == 4001);   // doesn't compile
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to