A opIndexUnary quiz
Era Scarecrow
rtcvb32 at yahoo.com
Tue Jan 1 13:32:31 PST 2013
On Tuesday, 1 January 2013 at 21:19:04 UTC, monarch_dodra wrote:
> ==========================================
> Related: I fixed a similar bug in std.container.DList recently:
> Can you spot the error?
>
> //----
> DList opOpassign(string op, Stuff)(Stuff rhs)
> if (op == "~" && is(Stuff == DList))
> //----
>
> The fact that it made it into the standard library is, IMO, a
> tell tale sign of a big problem. A "smoking gun".
I know it should be opOpAssign, but is easy to mess up...
More information about the Digitalmars-d-learn
mailing list