Multiple Inheritance of Classes

superdan super at dan.org
Tue Aug 12 16:26:50 PDT 2008


superdan Wrote:

> interface Stack!(T)
> {
>     bool empty();
>     T push() out { enforce(!empty); }
>     T pop() in { enforce(!empty); }
>     T top() in { enforce(!empty); }
> }

interface Stack!(T)
{
    bool empty();
    void push(T t) out { enforce(top() == t); }
    T pop() in { enforce(!empty); }
    T top() in { enforce(!empty); }
}

mah bad.




More information about the Digitalmars-d mailing list