Subject: Re: [boost] [intrusive] rtti_base class proposition
From: Ireneusz Szpilewski (irek_at_[hidden])
Date: 2009-10-21 09:09:44
Stewart, Robert wrote:
> Ireneusz Szpilewski wrote:
>> I don't care what you call it. There is no good reason to do this in C++.
>> [snipped examples of using containers of heterogeneous types.]
>> I'm well aware of uses of this approach and they are usually misguided. A common base class is not terribly helpful. One specific to a particular use case is far more useful. Using your approach encourages programming with dynamic_cast. There are times when it is needed, but its use should be limited and not encouraged generally.
>>> I think of rtti_base as of yet another screwdriver in our toolbox. The
>>> more tools we have, the more various things we can do. As you wrote:
>>> "There are times when it is needed" ;-) so, why not to have it?
>>> Ireneusz Szpilewski
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk