Hi everyone,
Could someone please point me in the right direction with this one? :
class data
{
int x;
};
class worker
{
void run(&data d);
};
void run_worker(worker& w, data& d)
{
boost::thread(boost::bind(&worker::run, &my_worker,
_1)(boost:ref(my_data)));
}
void main()
{
worker my_worker;
data my_data;
run_worker(my_worker, my_data);
}
Compiling this yields..
test.cpp(24) : error C2440: 'type cast' : cannot convert from
'boost::_bi::bind_t::result_type' to 'boost::thread'
with
[
R=void,
F=boost::_mfi::mf1,
L=boost::_bi::list2>::B1,boost::_bi::list_av_2>::B2>
]
Expressions of type void cannot be converted to other types
Can I not bind to functions with a void return type? Changing it to int,
produces a similar message.
Any help appreciated!
Thanks,
Mike
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/