Re: guard condition for a callable thingy, with THESE arguments

2016-05-15 Thread Ann W. Griffith via Digitalmars-d-learn
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

Re: guard condition for a callable thingy, with THESE arguments

2016-05-14 Thread Ann W. Griffith via Digitalmars-d-learn
On Sunday, 15 May 2016 at 01:59:15 UTC, cy wrote: I take callbacks on occasion, and I don't really care if they're a delegate, or a function, or a callable object, and I can assert that in a template: void foo(Callable)(Callable callback) if(isSomeFunction!Callable || isCallable!Callable) {

Re: Please mark off-topic discussions with [OT]

2016-05-14 Thread Ann W. Griffith via Digitalmars-d
On Saturday, 14 May 2016 at 16:59:32 UTC, Chris wrote: I think Adam's suggestion is good. Just ignore things you're not interested in (although it can sometimes cost you €73, if you ignore threads ;) 73€ ? Do you talk about the free book ?