Boost logo

Boost :

Subject: Re: [boost] [intrusive] rtti_base class proposition
From: Ireneusz Szpilewski (irek_at_[hidden])
Date: 2009-10-21 17:26:15


Scott McMurray wrote:
> 2009/10/21 Ireneusz Szpilewski <irek_at_[hidden]>:
>
>> Scott McMurray wrote:
>>
>>> How do you implement a heart transplant when you inherit from your
>>> heart, rather than contain it?
>>>
>>>
>> Before transplant:
>>
>> class Me: private MyHeart
>> {
>> };
>>
>> After transplant:
>>
>> class Me: private SombodyElsesHeart
>> {
>> };
>>
>> And how exactly are you supposed to make that change at runtime?
>>
What do you suggest?

heart as a member of Me?

Before:

class Me
{
        MyHeart heart;
};

After:

class Me
{
    SomebodyElsesHeart heart;
}

It can't be done at runtime either.
>> (That's not a heart transplant; That's growing a clone body around the
>> new heart.)
>>
This is exactly how transplant is seen from the new heart point of view ;-)

Ireneusz Szpilewski


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