On Sunday, 12 January 2014 at 18:28:38 UTC, Meta wrote:

It looks like your opBinary on strings is an attempt at globally overriding the XOR operator. I'm almost 100% sure this won't work in D. All operator overloads have to be part of a class or struct.

How would I do that without rewriting an entire string class? It seems I can't even inherit from string.

Forgive me for making the comparison, but I believe in C++ i can simply implement this function and be done with it:

    string operator^(string lhs, string rhs);

Reply via email to