Within code block between braces { }, an instruction is expected. Expression a-b isn't an instruction. What may confuse you is, that a-b at compilation expands to { return a-b; }. So, in lambda expression you can use simplified notation a-b or full instruction { return a-b; }, but can't mix them.
OP solved it, closing
Within code block between braces { }, an instruction is expected. Expression
a-b
isn't an instruction. What may confuse you is, thata-b
at compilation expands to{ return a-b; }
. So, in lambda expression you can use simplified notationa-b
or full instruction{ return a-b; }
, but can't mix them.Thanks!