compile time class introspection?

Daniel Keep daniel.keep.lists at gmail.com
Thu Jun 14 06:47:14 PDT 2007


class A { void foo() {} }
class B { void bar() {} }

A a;
B b;

assert( is( typeof(&a.foo) ) );
assert( is( typeof(&b.bar) ) );
assert(!is( typeof(&a.bar) ) );
assert(!is( typeof(&b.foo) ) );

Or something like that.

	-- Daniel


More information about the Digitalmars-d-learn mailing list