boost::thread and boost::bind

I am attempting to do this in vs.net 2003:
int f(HANDLE, HANDLE, HANDLE);
int main(int argc, char* argv[])
{
HANDLE x;
HANDLE y;
HANDLE z;
boost::thread* p = new boost::thread(boost::bind(f, x, y, z);
p->join();
delete p;
}
As a contrived example it works. In my project it does not, spewing
out 5 errors:
1) c:\src\include\boost\bind.hpp(62) : error C2825: 'F::result_type':
cannot form a qualified name
c:\src\include\boost\bind\bind_template.hpp(16) : see reference
to class template instantiation 'boost::_bi::result_traits

On Apr 6, 2004, at 1:47 PM, GoochRules! wrote:
I am attempting to do this in vs.net 2003:
int f(HANDLE, HANDLE, HANDLE);
int main(int argc, char* argv[]) { HANDLE x; HANDLE y; HANDLE z;
boost::thread* p = new boost::thread(boost::bind(f, x, y, z);
It wants a void () function. You've given it an int () one. I'm not sure if there's a really slick way to discard that return value. Anyone?

On Tuesday 06 April 2004 03:12 pm, Scott Lamb wrote:
On Apr 6, 2004, at 1:47 PM, GoochRules! wrote:
I am attempting to do this in vs.net 2003:
int f(HANDLE, HANDLE, HANDLE);
int main(int argc, char* argv[]) { HANDLE x; HANDLE y; HANDLE z;
boost::thread* p = new boost::thread(boost::bind(f, x, y, z);
It wants a void () function. You've given it an int () one. I'm not sure if there's a really slick way to discard that return value. Anyone?
The slick way to discard the return value is to do nothing :)
A function

nevermind. I had a copy of the an old header file with the 2-parameter declaration that was being included prior to the new file.
participants (3)
-
Douglas Gregor
-
GoochRules!
-
Scott Lamb