Skip to content

Conversation

@audiobird
Copy link
Member

Fixes callable function class which wouldn't compile for me. Is there a chance I was using it wrong?

auto capture{0};
auto func = Function<int(int, int)>{[&capture](int a, int b) {
	capture += 10;
	return a + b + capture;
}};
auto out = func(10, 10); // no matching function call error

Also adds unit test

@danngreen
Copy link
Member

Not sure how that error got in there, good find!

@danngreen danngreen merged commit 340979d into main Apr 14, 2025
9 checks passed
@audiobird audiobird deleted the callable branch April 14, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants