Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[boost/ut.hpp] Unknown source error when the topmost lambda captures #177

Closed
sam20908 opened this issue Apr 8, 2021 · 2 comments
Closed

Comments

@sam20908
Copy link

sam20908 commented Apr 8, 2021

It works fine if the lambda wasn't captured.

Reduced repro:

#define APPROVALS_UT
#include <ApprovalTests.hpp>

int main()
{
	boost::ut::test("test") = [&]() {
		ApprovalTests::Approvals::verify(42);
	};
}
@sam20908 sam20908 changed the title [boost/ut.hpp] Unknown source error when used within a capturing lambda [boost/ut.hpp] Unknown source error when the topmost lambda captures Apr 8, 2021
@claremacrae
Copy link
Collaborator

Thanks for reporting this.

It's good to know that the Boost.ut integration is being used.

As far as I can tell, this looks to be the same as #157 - although the observation that it's the top-most lambda that matters is interesting.

We suspect it's an issue in the Boost.ut framework, and have added a test to detect if the behaviour ever improves:

eb96309

@claremacrae
Copy link
Collaborator

I have logged this issue in the boost.ut project: boost-ext/ut#434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants