Re: Using alias parameters with class members in CTFE (related to UDAs)

2013-07-23 Thread Johannes Pfau
Am Wed, 24 Jul 2013 02:13:50 +0200 schrieb Andrej Mitrovic : > On 7/23/13, Johannes Pfau wrote: > > Does anyone know why this code is not working? > > http://dpaste.dzfl.pl/b89e7b3f > > Add 'static' to getAttribute and it will work. I know, it's weird, and > I've seen this sort of workaround use

Re: Using alias parameters with class members in CTFE (related to UDAs)

2013-07-23 Thread Andrej Mitrovic
On 7/23/13, Johannes Pfau wrote: > Does anyone know why this code is not working? > http://dpaste.dzfl.pl/b89e7b3f Add 'static' to getAttribute and it will work. I know, it's weird, and I've seen this sort of workaround used before. I think it's a compiler bug.

Using alias parameters with class members in CTFE (related to UDAs)

2013-07-23 Thread Johannes Pfau
Does anyone know why this code is not working? http://dpaste.dzfl.pl/b89e7b3f It seems calling "enum a = __traits(getAttributes, Class.member);" is OK without an instance. But if I wrap the __traits call into another template with alias parameter like this: --- auto getAttribute(alias tar