Boost logo

Boost :

Subject: Re: [boost] Boost.Fiber mini-review September 4-13
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2015-09-07 17:13:22


On 9/7/2015 5:58 PM, Agustín K-ballo Bergé wrote:
> On 9/7/2015 5:42 PM, Nat Goodspeed wrote:
>> On Mon, Sep 7, 2015 at 4:28 PM, Agustín K-ballo Bergé
>> <kaballo86_at_[hidden]> wrote:
>>
>>> `fiber::async` signature is still wrong. Note this was a C++11 defect:
>>>
>>> http://cplusplus.github.io/LWG/lwg-defects.html#2021
>>
>> So to be clear, I think you are requesting this instead?
>>
>> template< typename Fn, typename ... Args >
>> future< typename std::result_of< typename
>> std::decay<Fn>::type(typename std::decay<Args>::type... ) >::type >
>> async( Fn && fn, Args && ... args) { ... }
>>
>> (making the corresponding future<> type change in both overloads of
>> course)
>
> That's the signature fix, yes. It appears the implementation already
> decay-copies the arguments correctly.

Just to be extra explicit, although I think it should be obvious, the
following lines would have to be changed to follow suit:

https://github.com/olk/boost-fiber/blob/master/include/boost/fiber/future/async.hpp#L25

https://github.com/olk/boost-fiber/blob/master/include/boost/fiber/future/async.hpp#L37

Regards,

-- 
Agustín K-ballo Bergé.-
http://talesofcpp.fusionfenix.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk