Re: Generic functions to convert to void* and from void*

2009-02-25 Thread TSalm
Le Wed, 25 Feb 2009 01:03:32 +0100, Daniel Keep daniel.keep.li...@gmail.com a écrit: TSalm wrote: In my case, there's also no possibility to get the wrong type, because it is managed by the type of the ColumnMem. You still have to get the code right. There's a surprising number of corner

Re: Generic functions to convert to void* and from void*

2009-02-24 Thread TSalm
TSalm wrote: I'm trying to build function which have the hability to convert a type to void* and from void*. First of all, I have to ask: have you looked at std.variant / tango.core.Variant? Yes, but it seems that Variant class uses more memory than void* . The Phobos Variant will use

Re: Generic functions to convert to void* and from void*

2009-02-24 Thread Daniel Keep
TSalm wrote: In my case, there's also no possibility to get the wrong type, because it is managed by the type of the ColumnMem. You still have to get the code right. There's a surprising number of corner cases trying to store arbitrary types. And about Object, if I want to store base type

Re: Generic functions to convert to void* and from void*

2009-02-23 Thread TSalm
I'm trying to build function which have the hability to convert a type to void* and from void*. First of all, I have to ask: have you looked at std.variant / tango.core.Variant? Yes, but it seems that Variant class uses more memory than void* . [...] I get the distinct impression that

Re: Generic functions to convert to void* and from void*

2009-02-23 Thread Daniel Keep
TSalm wrote: I'm trying to build function which have the hability to convert a type to void* and from void*. First of all, I have to ask: have you looked at std.variant / tango.core.Variant? Yes, but it seems that Variant class uses more memory than void* . The Phobos Variant will use

Generic functions to convert to void* and from void*

2009-02-22 Thread TSalm
Hello, I'm trying to build function which have the hability to convert a type to void* and from void*. I must use ref in the toPtr function because of this : http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.comgroup=digitalmars.D.learnartnum=15600 Do you think that what I

Re: Generic functions to convert to void* and from void*

2009-02-22 Thread TSalm
I'm trying to build function which have the hability to convert a type to void* and from void*. I must use ref in the toPtr function because of this : http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.comgroup=digitalmars.D.learnartnum=15600 Do you think that what I done is

Re: Generic functions to convert to void* and from void*

2009-02-22 Thread Daniel Keep
TSalm wrote: I'm trying to build function which have the hability to convert a type to void* and from void*. First of all, I have to ask: have you looked at std.variant / tango.core.Variant? I must use ref in the toPtr function because of this :