Le 17/04/2012 11:42, Walter Bright a écrit :
On 4/17/2012 1:47 AM, deadalnix wrote:
Le 17/04/2012 05:22, Walter Bright a écrit :
On 4/16/2012 7:20 PM, Andrei Alexandrescu wrote:
The scheme Walter proposed has a lot of flexibility - it plants one
pointer to
function per type. This is very flexible because that pointer could
point to the
same function and use a bitmap-based scheme, or (as Walter proposed)
point to
different instances of a template that does scanning in a
type-specific manner.


It could also be a pointer to data. It's entirely up to the template
what it's a pointer to.

Data can eventually be stored IN the pointer if needed. Does the
system allow
that ? If it doesn't, is it possible to enable it ?

I don't know what you mean.

If the data fit into the pointer (ie 32bits or 64bits), you don't need to point to data. You can just decide that the pointer IS the data. In other terms :

void* ptr;
size_t data = cast(size_t) ptr;

Such a size if sufficient for many types.

Reply via email to