[Issue 8059] Deprecate .classinfo
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 10 12:01:41 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059
Marco Leise <Marco.Leise at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Marco.Leise at gmx.de
--- Comment #3 from Marco Leise <Marco.Leise at gmx.de> 2012-05-10 12:03:05 PDT ---
typeid(x) doesn't work in all cases where x.classinfo works (on 2.057/2.059).
Something along the line of:
TypeInfo_Class[string] lookup;
class Foo
{
mixin Register!("foo");
}
template Register(string Trigger)
{
static this()
{
lookup[Trigger] = this.classinfo; // ok
// lookup[Trigger] = typeid(this); <- 'this' is only defined in
non-static member functions, not _staticCtor13
}
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list