LazyInterface (simplified Boost.Interfaces)
bearophile
bearophileHUGS at lycos.com
Tue Sep 21 13:50:07 PDT 2010
kenji hara:
> I heard Boost.Interfaces recently. Then, it implemented by D.
> http://github.com/9rnsr/scrap/blob/master/interfaces/interfaces.d
> How about you?
// static auto opDispatch(string Name, Args...)(Args args)
// {
// enum stc = 's';
// mixin(dispatch);
// }
}
But static opDispatch works:
struct Foo {
static void opDispatch(string name, Args...)(Args args) {
static assert(name == "hello");
}
}
void main() {
Foo.hello(10, 20);
}
So if you have found a bug you may add a minimized case in Bugzilla.
Bye,
bearophile
More information about the Digitalmars-d
mailing list