|
Boost : |
Subject: Re: [boost] Futures Review - inheriting from futures
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-01-06 18:58:46
----- Original Message -----
From: "Steven Watanabe" <watanabesj_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, January 07, 2009 12:44 AM
Subject: Re: [boost] Futures Review - inheriting from futures
>
> AMDG
>
> vicente.botet wrote:
>>>> In order to be able to inherit from futures, shouldn't the constructor(detail::future_object) or constructor(detail::future_impl) be protected?
>>>>
>>>>
>>> Why do you want to be able to inherit from futures?
>>>
>>
>> To extend their functionality.
>>
>
> I'm afraid that the above statement is absolutely zero use to me.
> future is not a polymorphic class, so you don't have anything
> to override.
We can inherit from a class that it is not polymorphic, of course we cannot use it polimorphicaly. There are a lot of clases that inherits from non polymorphic class in Boost.
I can overrride any function in the class of course not polymorphycaly.
I can also take the future as a member
> Do you a specific use that cannot (easily) be implemented
> with the current interface?
I would like to have a minimal future class that do not have callbacks, and on top of this define a callback_future. I don't not want to pay for wat I dont use. Inheritance is a mechanism to achieve it.
Best,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk