On Friday, 26 June 2020 at 14:12:00 UTC, drathier wrote:
I'm trying to get this to compile, without much luck:
You might be able to make it a function: bool foo() { auto fn(A)() { A delegate(A) fn; fn = delegate A(A a) { return fn(a); }; return fn; } return fn!(bool)()(true); }
but I need the function to be polymorphic, so I need the template.
I don't really understand your need though, can you post more context?