guard condition for a callable thingy, with THESE arguments

Ann W. Griffith via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 15 00:49:34 PDT 2016


On Sunday, 15 May 2016 at 07:22:57 UTC, cy wrote:
> On Sunday, 15 May 2016 at 02:12:38 UTC, Ann W. Griffith wrote:
>> use "Parameters" in the constraint or make a template that you 
>> can reeuse.
>
> This is what I've got going so far. Using static asserts to 
> have clearer errors when an incorrect callback is supplied. I'm 
> not... sure storage class is important.

It could be important, especially "ref" and "out" that could lead 
to UB if not checked, without compile error. "shared" also but 
when supplied, invalid callback will not compile.


More information about the Digitalmars-d-learn mailing list