Magnus Lie Hetland <mag...@hetland.org> wrote:
Hm. Using code quite similar to you, supplying a lambda in the second
aliasing, I get this error:
something.d(93): Error: template instance cannot use local
'__dgliteral2(__T3)' as parameter to non-global template optArg(alias
fun)
It seems it's explicitly objecting to what I want it to do...
Using optArg!"a", for example, works just fine -- but the whole point
was to include some local state. Using local functions worked (I
think...?) when I had a global template.
It seems D's compile-time computation system is less straightforward
than I thought :)
This is a bug. Please report it.
--
Simen