On 10/3/11, Steven Schveighoffer <schvei...@yahoo.com> wrote: > Probably slightly off topic, but be very careful with operator overloads > without using constraints. > > For example, I can do some weird things to your struct: > > Point p; > > p.opOpAssign!"*x; y+="(5); > > I suspect operator overloads are going to be a large hole in the interface > design of many objects, but at least they won't be exploitable once > compiled. > > -Steve >
Generally when I post examples I won't add any constraints, this is to make it easier for other people to read the code. All of the ops have constraints in my code.