Re: Resolve function pointers using UDA during CT

2014-02-23 Thread Tim Volckmann
On Sunday, 9 February 2014 at 13:48:36 UTC, Philippe Sigaud wrote: On Sun, Feb 9, 2014 at 2:10 PM, Tim Volckmann wrote: That's also possible... but how can I find all functions with MyUDA? Here is a possibility: *** module myUDAFunctions; import std.stdio; struct

Re: Resolve function pointers using UDA during CT

2014-02-09 Thread Tim Volckmann
On Sunday, 9 February 2014 at 13:03:47 UTC, Jakob Ovrum wrote: On Sunday, 9 February 2014 at 12:48:36 UTC, Tim Volckmann wrote: Any way to do something like this? No, associative arrays cannot be transferred from compile-time to runtime yet, due to implementation issues. The next best thing

Resolve function pointers using UDA during CT

2014-02-09 Thread Tim Volckmann
Hi guys, is there any way to create an function-array during CT using UDAs like the following: module myUdaFunctions; struct MyUDA { string Name; } @MyUDA("Function1") string myFirstUdaFunction(string myString) { // ... do something } @MyUDA("Function2") string mySecondUdaFunction(str