[Issue 1461] Local variable as template alias parameter breaks CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 30 01:50:54 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1461
clugdbug at yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.003 |1.019
------- Comment #1 from clugdbug at yahoo.com.au 2008-06-30 03:50 -------
Changed version, since this applied to D1.x as well. Still not fixed in D1.031.
For phobos2, the code now needs to use 'enum' instead of const to trigger the
behaviour:
---
void main()
{
int x;
enum string text = Gen!(x).generate();
}
template Gen(alias A)
{
string generate()
{
return null;
}
}
--
More information about the Digitalmars-d-bugs
mailing list