Specialization Not Allowed for Deduced Parameter
Yota via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 22 13:45:23 PDT 2014
On Friday, 22 August 2014 at 20:42:49 UTC, Yota wrote:
> Heya. I'm working on a simple units-of-measure implementation
> in DMD 2.066.0, and it doesn't seem to like the signature of my
> '*' operator below. I'm afraid I don't understand what the
> error description is trying to tell me. Here's a reduced case:
Same results for this simpler signature.
public struct UnitDef(string unitString) {
auto opBinary(string op, string N)(UnitDef!N rhs)
if (op == "*") {
return UnitDef!(unitString ~ " " ~ N)();
}
}
More information about the Digitalmars-d-learn
mailing list