How to obtain certain traits of delegates returned by functions in template constraints?

Jacob Carlborg doob at me.com
Sat Dec 14 13:58:46 PST 2013


On 2013-12-14 20:53, DoctorCaptain wrote:

> Second, can I get the level of thoroughness I am going for in these
> constraints checks with fewer actual checks? As in, is there a more
> straightforward way to do these checks without sacrificing any of them?
>
> Thank you for any and all insight!

I would think you can check the delegate signature directly without 
decomposing it. Something like this:

is(ReturnType!nextGen == T delegate (int))

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list