I try to run the template function in a separate thread, but IntelliSense (VC ++ 2010 Express) continues to give me an error: "Error: no instance of the constructor" boost :: thread :: thread "matches the argument list" and if I try to compile, I will get this error: "error C2661: 'boost :: thread :: thread': no overloaded function takes 5 arguments
The error occurred only since I added the templates, so I am sure that this is something related to them, but I do not know what.
Two of the arguments I pass for boost :: thread are template functions defined as:
template<class F>
void perform_test(int* current, int num_tests, F func, std::vector<std::pair<int, int>>* results);
and
namespace Sort
{
template<class RandomAccessIterator>
void quick(RandomAccessIterator begin, RandomAccessIterator end);
}
I am trying to call boost :: thread like this:
std::vector<std::pair<int, int>> quick_results;
int current = 0, num_tests = 30;
boost::thread test_thread(perform_test, ¤t, num_tests, Sort::quick, &quick_results);