May 08, 2004 missing typeinfo 0.88 | ||||
---|---|---|---|---|
| ||||
I know this is an old chestnut but .... even a simple Object[][] has a missing typedef, somewhere there should be a previous post by me about this (might be one last year too). -------------------------------------- import std.c.stdio; template typename(T) { static int getinfo() { return cast(int)cast(void*)T.typeinfo; } } class Foo { } int main( char[][] args ) { printf( "(Foo[]).typeinfo=0x%X\n", typename!(Foo[]).getinfo ); printf( "(Foo[][]).typeinfo=0x%X\n", typename!(Foo[][]).getinfo ); return 0; } // Error 42: Symbol Undefined __init_12TypeInfo_AAC |
May 08, 2004 Re: missing typeinfo 0.88 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wynn | I know. The typeinfo stuff is too limited, in that it needs a manually crafted class for each type. I've been thinking of ways to revamp it, but it'll probably be a 2.0 feature. |
Copyright © 1999-2021 by the D Language Foundation