how to compose delegate type

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Thu Dec 5 21:33:32 PST 2013


On Friday, 6 December 2013 at 02:42:44 UTC, Ellery Newcomer wrote:
> how do I construct F!(T) to yield
>
> void delegate() immutable
>
> when T is void delegate()
>
> ?
>
> [its been a long day]

I don't think I understand what you mean:

void main() {
     F!(void delegate());
}

immutable(T) F(T)() {
     return () {};
}

Initially I thought you meant T was a void delegate but passing 
delegates as compile time parameters isn't really an option.


More information about the Digitalmars-d-learn mailing list