typeid reversing ?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sun Sep 3 11:06:32 PDT 2006
"Daniel919" <Daniel919 at web.de> wrote in message
news:edf3no$2u23$1 at digitaldaemon.com...
> Hi,
> just had some thoughts about casting and types.
>
> ...
>
> Is there a way to do this ? If not, could something like this be
> integrated
> to D ?
The problem with this is that variadic functions are evaluated at runtime.
What you want to do is cast the _argptr to a type, something which has to be
determined at compile-time. The only way to do runtime typing is using the
TypeInfo classes, which is what typeid is for.
The solution to this would be templates that take variadic arguments,
something that D can't do yet.
More information about the Digitalmars-d-announce
mailing list