Only want to say
Meta
jared771 at gmail.com
Mon Jan 11 17:48:26 UTC 2021
On Monday, 11 January 2021 at 16:53:42 UTC, Ali Çehreli wrote:
> On 1/11/21 2:52 AM, ddcovery wrote:
>
> > Is it possible to us in/out in a lambda expression?
>
> I don't think so. I guess, if it has contracts, it deserves to
> be a proper function. :)
>
> Ali
It seems that it does work, but you need to include the
`function()` preamble; it doesn't seem to like including
contracts with the short-form function literals.
void test(void function() f)
{
f();
}
void main()
{
test(function() in(1 == 0) out(; 1 == 0) {}); //Okay
}
More information about the Digitalmars-d
mailing list