bearophile Wrote:
> grauzone:
> >Why don't you just go and try?<
>
> Mostly because C++ isn't one of the languages I know. I don't fully
> understand that code.
There's really not much to understand there. The difference from mixin is that
Base can inherit an interface so that Derived exposes the interface just by
deriving from Base.
class Base(Derived)
{
void interface()
{
// ...
(cast(Derived)this).implementation();
// ...
}
static void static_func()
{
// ...
Derived.static_sub_func();
// ...
}
}
class Derived : Base!(Derived)
{
void implementation(){...}
static void static_sub_func(){...}
}