|
Boost : |
Subject: Re: [boost] Boost.Fiber mini-review September 4-13
From: AgustÃn K-ballo Bergé (kaballo86_at_[hidden])
Date: 2015-09-04 15:09:27
On 9/4/2015 4:00 PM, Oliver Kowalke wrote:
> 2015-09-04 20:24 GMT+02:00 AgustÃn K-ballo Bergé <kaballo86_at_[hidden]>:
>
> There's also a great deal of code duplication for `T`, `T&` and `void`
>> while only a handful of functions differ. This is not a sign of good
>> design, and will make maintenance difficult.
>>
>
> could you point to an exact source line, please?
Certainly, that would be:
- All of `future` and `shared_future`
https://github.com/olk/boost-fiber/blob/master/include/boost/fiber/future/future.hpp
- All of `shared_state`
https://github.com/olk/boost-fiber/blob/master/include/boost/fiber/future/detail/shared_state.hpp
- All of `promise`
https://github.com/olk/boost-fiber/blob/master/include/boost/fiber/future/promise.hpp
- All of `task_object`
https://github.com/olk/boost-fiber/blob/master/include/boost/fiber/future/detail/task_object.hpp
For each of them, there is only one function that varies amongst
specializations. Moving common code to a helper base class will make the
code readable, easier to maintain, and reduce the bloating.
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