Is there a way to

Adam D Ruppe destructionator at gmail.com
Sun Sep 11 00:04:55 UTC 2022


On Saturday, 10 September 2022 at 23:37:30 UTC, Kyle Ingraham 
wrote:
> How can I write a type that is strict for the first two 
> parameters but tolerant of any other parameter following those?

That's not a type per se, but you can assign wrapper at the 
assignment thing.

Like

your_delegate = (a,b) => func_with_three_args(a, b, "some 
default");

that kind of thing. if you have a delegate in an object, you can 
use a property setter to accept more things and wrap it like that.


More information about the Digitalmars-d-learn mailing list