Skip to content

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

@Ahajha

Description

@Ahajha

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));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions