import std.conv, std.stdio, std.algorithm;

struct S {
void opDispatch(string s, T...)(T t) if (s.startsWith("foo")) {
        writeln(s);
    }
}

void main() {
    S s;
    s.foo();
auto p = s.to!string(); // Error: s.opDispatch!("to") isn't a template
}

Should the constraint on opDispatch allow the UFCS "to" call on S?

Reply via email to