Hello I would like to create validation mixin or mixin template which would return on error.

Something like this:


```
mixin template Validate(a, b)
{
    if(a > b)
    {
       writeln("invalid input");
       return false;
    }
}

bool test(a,b)
{
    mixin Validate!(a,b);

    ----
    on valid code
    ----

    return true;
}
```

  • mixins Abby via Digitalmars-d-learn

Reply via email to