Subject: Re: [boost] [intrusive] rtti_base class proposition
From: Ireneusz Szpilewski (irek_at_[hidden])
Date: 2009-10-22 00:39:23
Matus Chochlik wrote:
> On Wed, Oct 21, 2009 at 2:54 PM, Ireneusz Szpilewski
> <irek_at_[hidden]> wrote:
>> Stefan Strasser wrote:
>>> Am Tuesday 20 October 2009 19:47:38 schrieb Ireneusz Szpilewski:
>>>> > Why is a common, standardized or de facto standard name needed? The
>>>> usual case is to create a base class for each context in which a common
>>>> base is desired.
>>> there are various solutions for this in C++ and boost.
>>> when you migrate from another language a common object base class might
>>> seem necessary, but I don't know of a case that can't be handled by void *,
>>> boost::any, boost::variant...
>> I think it would be yet another possibility, kind of smart void*.
> Actually there is such "smart void*" which does rtti checking during casts
> in the Boost Vault: [vault]/Memory/RawPtr/rawptr-draft.zip
> But do we need a special library for such a simple thing?
>> In math, objects having special properties deserve unique name to
>> identify them, as 0, 1, pi. We don't have special name for number
>> 245.43234. An empty class with sole virtual destructor
>> is such a special object. C++ allows RTTI iif class has a virtual
>> function. So the easiest way to tell someone how to RTTI-enable his
>> class would be to say: "Derive from rtti_base").
>> class rtti_base
>> Ireneusz Szpilewski
>> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk