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

Function call that should not compile is able to be passed into push() #32

Open
Ahajha opened this issue Feb 3, 2021 · 0 comments
Open

Comments

@Ahajha
Copy link

Ahajha commented Feb 3, 2021

The following program demonstrates the issue. This is using the STL version.

struct A {};

void f(int, A&) {}

int main()
{
	ctpl::thread_pool pool(4);
	
	A a;
	
	// Does not compile
	//f(0,std::move(a));
	
	// So this shouldn't be expected to compile either, yet it does
	//pool.push(f, std::move(a));
}
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

No branches or pull requests

1 participant