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

2013-07-24 Thread Johannes Pfau
Am Wed, 24 Jul 2013 02:13:50 +0200 schrieb Andrej Mitrovic andrej.mitrov...@gmail.com: On 7/23/13, Johannes Pfau nos...@example.com 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

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

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

2013-07-23 Thread Andrej Mitrovic
On 7/23/13, Johannes Pfau nos...@example.com 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.