21 May 15:05
Re: [thread] test_lock* and test_move* failures on trunk
From: Peter Dimov <pdimov <at> pdimov.com>
Subject: Re: [thread] test_lock* and test_move* failures on trunk
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-21 13:05:17 GMT
Subject: Re: [thread] test_lock* and test_move* failures on trunk
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-21 13:05:17 GMT
Markus Schöpflin:
> Anthony Williams wrote:
>
>> Could you try adding the following overload of the thread constructor
>> to boost/thread/pthread/thread.hpp
>>
>> template <class T,class R,class P1,class A1>
>> thread(R (T::*f)(P1),A1 a1):
>>
>> thread_info(make_thread_info(boost::bind<void>(boost::mem_fn(f),a1)))
>> {
>> start_thread();
>> }
>>
>> If that makes the problem go away, I'll commit the change.
>
> I tried, but the compiler prefers the other constructor when resolving the
> overload, so the error persists.
Try
template <class T, class R, class A1>
thread(R (T::*f)(),A1 a1):
without the P1. This would only work for no-argument non-const member
functions though. More overloads are needed to cover all cases. I'll think
about fixing that somehow on the bind side. A more systematic thread::thread
test that covers all possibilities would be nice to have.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed