why would you overload already existing operators in Sepples instead of inventing your own symbol or keyword to avoid confusion with non-overloaded standard operators?
>>1
To make your own classes that represent mathematical entities such as vectors, matrices, quaternions, arbitrary precision data types etc, etc, etc.
Generic code, bitches.
template<typename MyAnus>
void hax(Anus& anus)
{
anus ^= 2;
anus ^= anus;
anus ^= 21;
}
works for everything that defines ^= operator ([spoiler]NO EXCEPTIONS). I can use it like
MyAnus myAnus;
OpAnus opAnus;
hax(myAnus);
hax(opAnus);
If i decided to implement custom operators like ^^= and =^_^= then the code above wouldn't compile.
Doing it wrong. You need at least five policy classes, 2 non-class template specializations and the function should be marked:
virtual void hax(Anus***& anus) const __attribute_((deprecated))