So this is the general form of what I'm trying to do:
import std.stdio;
class Foo(uint something)
{
Foo opBinary(string op)(Foo rhs) const
if (op == "*")
{
writeln("calling Foo.*");
}
}
class Bar : Foo!(3)
{
// ...
}
class Baz : Foo!(4)
{
//...
}
void main()
{
auto bar =
Matthew Dudley:
I'm still fairly new to D, and my google-fu has failed me. I
don't understand this error.
You have to remember that an instantiated template creates a
totally distinct type.
There are few different ways to face your problem, this is one of
them:
import std.stdio;
class